Can anybody advise on the best PDF generator class/library to use with PHP? Preferably one which is maintained.
I am aware that this is a duplicate of the following question, however, the accepted answer is over 3 years old and I want to know whether the answer has changed since this time.
Here is Solutions:
We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.
Try TCPDF, have good features
Also simple HTML to PDF Converter API in (PHP, C#, ASP.net C#, ASP VB.net, JAVA,…)
from “PDF CROWD”
very simple to use, but I think this API may need to purchase even they provide a free test account..
Have you tried http://www.PDFnow.com?
Provides a powerful template engine, and is pretty easy to use.
Supports complex layouts, layouts for multiple pages, invoices spreading separate pages, pagenumbers, headers, footers, etc. Definitively much better than fpdf.
You can simply integrate it into your PHP code by:
Have a look on http://wkhtmltopdf.org/ Convert HTML to PDF using WebKit engine.
It can be used from PHP easily. For example, there is a bundle for Symfony2: http://knpbundles.com/KnpLabs/KnpSnappyBundle
Best One is TCPDF
Never Use DOMPDF
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂