Questions about PHP generating PDF files with Html2pdf
You master: Ask you a question, I use PHP html2pdf generated dynamic PDF, found a problem, such as the HTML file to enter more than a line length of characters (such as: 200 characters), then the resulting PDF, can only display one line, will not wrap, Unless I manually in the HTML file through \ n or
A newline was made to show normal. Using the instance top bottom righ left to set the margin is not used. Thank you! Is there anyone who has such a problem?
The code is as follows:
$html 2pdf = new Html2pdf (' P ', ' A4 ', ' fr ', true, ' UTF-8 ', Array (30, 20, 25, 25));
$html 2pdf->pdf->setdisplaymode (' fullpage ');
Note: The margin set for array (30, 20, 25, 25) in this code only works on HTML wrapped.
Share to:
------Solution--------------------
This is the problem of html2pdf, you can not change it, only adapt to it.
If you can control the site page, you can also adapt.
But if you want to deal with other Web pages, then you can only search for another tool.