Menu

#971 Page regions in MultiCell wrong margin

v1.0_(example)
closed
nobody
None
5
2014-09-05
2014-09-05
No

Thank you for your wonderful PHP class, I use it for an annual charity auction web site, and it has helped a lot.

At line 5825 in version 6.093 (TCPDF::MultiCell):

list($x, $y) = $this->checkPageRegions(0, $x, $y);

I think this might be a bug. When the cell coordinates are not in the left margin, the left margin is moved, but it should not be adjusted.

The class works better when line 5825 is commented. To explain, I have attached 2 images.

  • Image 1 is named "uncommented_line_5825.png", I believe this is incorrect
  • Image 2 is named "commented_line_5825.png", I believe this is correct
2 Attachments

Discussion

  • Nicola Asuni

    Nicola Asuni - 2014-09-05
    • status: open --> closed
     
  • Nicola Asuni

    Nicola Asuni - 2014-09-05

    I am unable to reproduce your issue.
    Please have a look at the source code of the example n. 64.

     
  • Robert Johnson

    Robert Johnson - 2014-09-05

    Sorry Nicola, but I think you have dismissed the issue without really looking at it.

    In example 64, you can reproduce the issue by changing line 142 to this:

    $pdf->writeHTMLCell(0, 0, '', '', $txt, 0, 1, false, true, 'J', false);
    

    Actual result: The right margin is changed for the whole document.

    Expected result: the html should go around the region without changing the margin.

    There is only a problem when the cell begins next to a region. In all other cases the call to checkPageRegions() does nothing to the margins.

    Thanks again for your hard work on TCPDF.

     

Log in to post a comment.