Which PHP class is better to export and print PDF files on the page?

Source: Internet
Author: User
Recently, I have been printing various web reports and queried various print solutions. I personally think it looks comfortable to export the PDF on the tab, so I found various PHP PDF export tools. There are too many such tools, and one test is too hard. I want to have a useful and mature solution...

Recently, I have been printing various web reports and queried various print solutions. I personally think it looks comfortable to export the PDF on the tab, so I found various PHP PDF export tools.

There are too many such tools, and one test is too hard. I want a useful tool with mature solutions so that I can use them on all pages.

TCPDF and DOMPDF

1. TCPDF supports Chinese UTF-8 encoding, very convenient. However, this style is very painful. the CSS section shows that some key elements, such as the height, cannot be followed by CSS normally. I don't know whether it is a bug or what is going on, it is too painful to call CSS, and many CSS attributes cannot be used. I don't know what went wrong.

2. dompdf css support seems better than TCPDF. However, Chinese encoding is not supported. It is troublesome to download any fonts. I don't think users can install a font! So I had to give up.

Please recommend a reliable, easy-to-use PHP tool for exporting PDF! Sorry!

Reply content:

Recently, I have been printing various web reports and queried various print solutions. I personally think it looks comfortable to export the PDF on the tab, so I found various PHP PDF export tools.

There are too many such tools, and one test is too hard. I want a useful tool with mature solutions so that I can use them on all pages.

TCPDF and DOMPDF

1. TCPDF supports Chinese UTF-8 encoding, very convenient. However, this style is very painful. the CSS section shows that some key elements, such as the height, cannot be followed by CSS normally. I don't know whether it is a bug or what is going on, it is too painful to call CSS, and many CSS attributes cannot be used. I don't know what went wrong.

2. dompdf css support seems better than TCPDF. However, Chinese encoding is not supported. It is troublesome to download any fonts. I don't think users can install a font! So I had to give up.

Please recommend a reliable, easy-to-use PHP tool for exporting PDF! Sorry!

The Chinese version of MPDF is so simple:

include("../mpdf.php");$mpdf=new mPDF('zh-CN','A4','','',32,25,27,25,16,13);// LOAD a stylesheet$mpdf->WriteHTML($html);$mpdf->Output();exit;

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.