Questions about PHP generating PDF files with Html2pdf

Source: Internet
Author: User
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.