Hello,
I recently installed DOMpdf as a means of replacing html2pdf on our
server. After we upgraded from PHP 5.1 to 5.3.2, our dynamically-
generated pdf process stopped working. The original process was
calling a script on the server, passing a GET variable, and using that
variable to generate dynamic content in the resulting html.
After the upgrade, a pdf would get created, but would be blank and
give the error "Acrobat could not open 'test.pdf' because it is either
not a supported file type or because the file has been damaged." I
uploaded the file "test.pdf" as an example. I assumed that this meant
that the file was never being written in the first place. I decided to
try DOMpdf in the hopes that it would eliminate this problem. I solved
the initial setup problem that I discussed in an earlier thread on
this forum and was eventually able to output an html string without a
problem. I went to try and include the original dynamic page using
$dompdf->load_html_file() and sure enough, I got the same error as
when I was using html2pdf.
As a test, I took the html table, complete with dynamic content, and
moved it all over to the original file. I turned the table into one
giant html string. I then tried outputting the file again and got the
same error. I then stripped out the vast majority of the html string
and left a few paragraphs in. The pdf was created properly, so this
leads me to think that there is something in the html that DOMpdf
doesn't like. Can anyone see anything glaring that needs to be
omitted? I've been trying to troubleshoot this problem for a solid two
weeks now, so any help would be very much appreciated. Thanks.
<div id="pageContent" style="padding: 0px 0px 0px 0px; background-
image: none;text-align:center; width:100%;">
<center>
<div id="acknowledgment">
<table border=0 cellpadding="0" cellspacing="0" width="704"
style="margin-top:50px;margin-bottom:50px;">
<tr>
<td style="background-image:url(/images/ack-top.gif);background-
repeat:no-repeat;height:33px;"></td>
</tr>
<tr>
<td class="size13 black_txt" style="background-image:url(/images/
ack-middle.gif);background-repeat:repeat-y;padding:25px;">
<?=$logo?>
<center><span class="size18 bold">Lorem Ipsum</span></center>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Etiam tempor tempus quam viverra hendrerit. Fusce vitae placerat sem.
Sed nibh arcu, fringilla et placerat in, adipiscing et nulla. Quisque
ut augue ligula. Morbi hendrerit porta lectus, sit amet adipiscing
arcu bibendum vel. Mauris et metus a lacus posuere tristique. Praesent
dignissim mattis <?=$company['name']?> purus nec sagittis. In eget
purus ut ligula euismod sodales. Phasellus ac nibh orci. Proin augue
nisl, egestas vel eleifend et, molestie ut tellus. In pulvinar nibh
sit amet justo volutpat tincidunt ullamcorper ut risus. Aliquam justo
orci, porta vel malesuada eget, vehicula ut elit. Etiam blandit, lacus
sit amet elementum hendrerit, ligula lectus hendrerit eros, <?=
$company['name']?> vel hendrerit enim ipsum sit amet arcu. Nam eu odio
arcu. Sed accumsan, enim eget fringilla commodo, lorem nulla egestas
nibh, sed porta turpis enim ac mauris. Nullam volutpat condimentum
ultricies. Proin malesuada mattis augue quis facilisis. Sed sed <?=
$company['name']?> purus purus, sit amet scelerisque erat. Sed eget
sem diam.</p>
<center>
<form method="post" action="#" id="ack" name="ack">
<br/><br/>
<table border=0 cellpadding="5" cellspacing="0" width="75%">
<tr>
<td align="right" valign="top" class="size13 bold"
style="padding-top:6px;">Full Name:</td>
<td align="left" class="size13 bold" style="padding-left:
25px;"><input type="text" name="fullname" value="<?=
$ackinfo['fullname']?>" class="jsrequired ackinput" readonly/></td>
</tr>
<tr>
<td align="right" valign="top" class="size13 bold"
style="padding-top:6px;">Electronic Signature:</td>
<td align="left" class="size13 bold" style="padding-left:
25px;"><input type="text" name="esig" value="<?=$esig?>"
class="jsrequired ackinput" readonly/></td>
</tr>
<tr>
<td colspan="2" style="padding:10px;"><?=date("m/d/Y h:i a")?
></td>
</tr>
</table>
</form>
</center>
</td>
</tr>
<tr>
<td style="background-image:url(/images/ack-
bottom.gif);background-repeat:no-repeat;height:33px;"></td>
</tr>
</table>
</div>
</center>
</div>
--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To post to this group, send email to
dom...@googlegroups.com.
To unsubscribe from this group, send email to
dompdf+un...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/dompdf?hl=en.