I have been using PDFLib for over 4 years now on various projects. Of course, I had to buy the PDFLib license because most are commercial projects and we needed the PDI feature which allows you for example to use another PDF document as a template. So I bought the PDFLib 5 license, then the PDFLib 6 license update because if I remember
correctly PDFLib 5 didn't support unicode or something like that.
That's about 1000 euros each time.
Recently, we have upgraded our hosting plan from our hosting company and instead of a single CPU on the server, we now have two for the same price. It's a nice upgrade. Unfortunately, PDFLib didn't like the upgrade and now returns the following error when we generate a document with our serial number
"Found 2 CPUs - license covers
only 1".
Of course, I have contacted their sales department about the problem. They replied that I should either buy another license for PDFLib 6 for the second CPU, or eventually buy PDFLib 7 which doesn't have this per CPU limitation. Both solutions cost approximately the same price, more than 900 euros !
I don't feel like buying another license and I don't need PDFLib 7 "features".
So, farewell PDFLib ! It was nice working with PDFLib but they obviously became too greedy.
I am going to investigate other toolkits. I know that most of them do not support features like PDI, but I can probably find another way around this issue. So far, I have found :
-
Haru : There is a brand new PECL extension for Haru written by Antony Dovgal which was released last week in version 1.0. Sounds interesting !
-
FPDF : These are mostly PHP classes. The author claims that it is not as fast as PDFLib but says it performs well. I have already tried this solution before and it was working very well but I was only producing PDF invoices for an e-commerce site. Building a full catalogue might be too much for it. The
nice thing is its companion class FPDI which can also import existing PDF files and worked for me the last time I tried.
-
TCPDF : In the same vein as FPDF, these are a set of PHP classes for generating PDF documents. I need to have a look at it as well. It seems to work with FPDI too.
-
Panda : There is also a PECL extension for Panda, but I am not sure it is maintained and the project didn't release anything for a long time.
-
Cairo : Cairo has a backend for PDF rendering. Given its strengths in graphics, this can be interesting but I think it will be too limited in my case as I need to create documents with multiple pages. There is also a PECL Extension for Cairo
(there are two actually, but the other one didn't make a release yet).
I now have to evaluate them and rewrite some code for our new server. But in the end, I won't have to deal with PDFLib and its licensing mess anymore, so that's for the better.