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;