PHP PDF Generator Advice

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.

Which one is the best PDF-API for PHP?

Thank you

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.

Solution 1

Try TCPDF, have good features
http://www.tcpdf.org/examples.php

Also simple HTML to PDF Converter API in (PHP, C#, ASP.net C#, ASP VB.net, JAVA,…)

from “PDF CROWD”
http://pdfcrowd.com/html-to-pdf-api/

very simple to use, but I think this API may need to purchase even they provide a free test account..

Solution 2

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:

generatePdf(<templateName>, <ParameterArray>);

very straightforward.

Solution 3

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

Solution 4

Best One is TCPDF

http://www.tcpdf.org/

Never Use DOMPDF

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply