Problem in PDF generation from HTML

99 views
Skip to first unread message

vin

unread,
Nov 10, 2011, 8:27:47 AM11/10/11
to dompdf-dev
Hello,

I am using this library.i am facing some problem. i have
html which contain table nesting. when i go to generate pdf for this
it shows one table in one page and shift other table in next pages and
so on.

if it seems okay in paid version then i am willing to purchase this
library. please generate pdf for the below html and revert back to
me.

Using this way.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {font-family:Arial, Helvetica, sans-serif; font-size:14px; margin:
0 auto; padding:0}
td {padding:0 5px; border:1px solid #333}
.clear {clear:both}
.main {width:980px; margin:0 auto}

</style>
</head>

<body>

<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="40%">
<table border="1" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="3%" >700.</td>
<td width="59%" >Total Real Estate Broker Fees</
td>
<td width="12%" >600.00</td>
<td width="14%" >Paid from</td>
<td width="15%">Paid from</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
</table>
</td>
<td width="10%">&nbsp;</td>
<td width="40%" valign="top"><table border="1" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td width="3%" >300.</td>
<td width="59%" >Total Real Estate Broker Fees</
td>
<td width="12%" >600.00</td>
<td width="14%" >Paid from</td>
<td width="15%">Paid from</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >Division of commission (line 700) as
follows:</td>
<td >&nbsp;</td>
<td >Borrower's</td>
<td >Seller's</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>



Thanks
Vinod

BrianS

unread,
Nov 11, 2011, 8:42:07 PM11/11/11
to dompd...@googlegroups.com
First, please post help requests to the support forum: https://groups.google.com/forum/#!forum/dompdf. This forum is for developer discussion, not for general support.

Second, dompdf is free to use. The PDFLib back end rendering engine costs money, but the main benefit is performance. Regardless of the chosen back end the actual visual appearance will be the same. (Though we do welcome donations.)

Finally, the main issue you have is that you are using nested tables. Currently there is an issue where dompdf is unable to split a table cell across pages. So if the content of a cell does not fit on the current page dompdf moves it to the next page. Worst case dompdf can enter an infinite loop because a table cell doesn't fit on a full-size page. We hope to address this issue in the 0.6.0 release.

Until we address this issue, you might consider using CSS float to lay out your page. You will need to use the latest code from the repository to do that, though.
Reply all
Reply to author
Forward
0 new messages