Question about Cpdf.php library

40 views
Skip to first unread message

oscar....@inkaviation.com

unread,
Nov 14, 2018, 9:05:08 AM11/14/18
to dompdf
How the function has been removed addTextWrap(). How to add a text delimited by a width in several lines?

BrianS

unread,
Dec 28, 2018, 10:00:52 PM12/28/18
to dompdf
Because the version of CPDF we include with Dompdf has been developed the project that function was not necessary (Dompdf handles text wrapping). I'd have to review the commit history to see why it was removed, but likely the lack of intelligent text handling in that method led us to remove it (rather than build it out).

If you're building your PDF manually you might want to use the latest iteration of the original CPDF project (https://github.com/rospdf/pdf-php). The method that version uses is fairly simple, it just splits on line breaks then shifts the y position by the height of the text. Something that can just as easily be done in your own code.
Reply all
Reply to author
Forward
0 new messages