PDF libraries compatible with PHP 7?

I’m wondering which mainstream libraries, like TCPDF, for generating PDF documents are compatible with PHP 7? TCPDF was last updated in September 2015 so I suppose it wasn’t tested but google doesn’t return any information. Do you have experience with such libraries on PHP 7?

First time I have used Let Me Google That For You :slight_smile:

Google: “php 7” “pdf library”

###Result:

https://www.pdflib.com/

FPDF is compatible (if you count that as a mainstream library). There are a few of the user supplied add-ons that need minor work to get them compatible.

1 Like

Unfortunately, your link to LMGTFY is broken - I am at a loss! :confused:

PDFlib is not a PHP library, it’s written in C++. Maybe I should clarify I want a library written in PHP and preferably having some support for rendering HTML tables.

Thanks.

If anyone is interested I have found a great PDF library dompdf - it is actively maintained and the latest version works without problems on PHP 7 - only the generation process is slightly faster! It can use PDFLib but can also work without any dependencies.

It also appears to have very good html and css support - not complete and occasionally incorrect but I was surprised how much is supported: tables, css3 selectors, page break rules, @page, @font-face and most other basic stuff. It’s quite an improvement over what I used a few years ago (TCPDF with poor html/css support - however, I don’t know how new TCPDF versions cope with that).

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.