Donate Share

TCPDF - PHP class for PDF

Tracker: Bugs

5 MultiCell with HTML, pagebreak - ID: 2894698
Last Update: Settings changed ( nicolaasuni )

Hi,

Difficult to explain the problem.
In the example file, on the first page is an example how I would like to
print cells with MultiCell. Pretty simple.

Page 2 uses the the same code but with SetAutoPageBreak(true), that I
always use.
Lines (borders) are printed where they should not be. A little to the left
and more at the bottom.
getLastH() returns the wrong height. Since there is a pagebreak, I don't
know if this is the Footer, Header or what lastheight it returns. But it's
wrong..
So on page 3, the text is getting over written.

How can I avoid this kind of accidents? How can I calculate this? Any
ideas?
Example is based on nr.6, but I had to rewrite it a bit to make it more
easier to read and also to trigger this problem.

BTW: Thanks for the last fix!

-Im


Im ( imsza ) - 2009-11-09 17:38

5

Closed

Invalid

Nobody/Anonymous

None

None

Public


Comment ( 1 )

Date: 2009-11-09 18:01
Sender: nicolaasuniProject AdminAccepting Donations

The problem is in your code.
The first cell is triggering the page break but not the second cell.
You have to add a control after the second cell to move on last page
($pdf->lastpage();) and set the proper Y coordinate.

You can also use HTML tables that already integrates these controls.
For further suppor tplease use the Help Forum.


Attached File ( 1 )

Filename Description Download
example_pgv.php MultiCell with HTML, pagebreak Download

Changes ( 4 )

Field Old Value Date By
status_id Open 2009-11-09 18:01 nicolaasuni
resolution_id None 2009-11-09 18:01 nicolaasuni
close_date - 2009-11-09 18:01 nicolaasuni
File Added 350169: example_pgv.php 2009-11-09 17:38 imsza