Skip to content

What tools do you use for server side PDF generation?

Christian Córdoba on October 24, 2018

Hey there, I'll keep it short. At our company we tried different approaches for PDF generation (server side, specifically in PHP) over the years ... [Read Full]
markdown guide

I use with a custom stylesheet, it works very well and is maintained.


Hi, thanks! I've heard of mpdf from one of our team members but we have the same pain point. Have you ever generated a complex design with mildly complex dynamic data?

Definitely having a very active repository makes it very appealing. I guess we'll have to prototype something and evaluate the developer experience while working and the results.


Well, here is the kind of pdf I generate. Is it complicated enough for you ? :p

Oh that is kind of inspiring :) PDFs are such a pain for almost every colleague I talked to about this issue '


I would suggest you to try Aspose.PDF Cloud SDK for PHP.
Have a look on a feature list:

You can create the templates and generate PDFs based on them. It is possible to implement the logic of any complexity: create, modify, convert, encrypt files, separate pages or elements with this library.
The greatest benefits you will feel while working with complicated PDFs with different shapes, tables, annotations, stamps, bookmarks, links, etc.

Note: I am working as Developer Evangelist at Aspose.


Hey, $99/month is a bit expensive for our use case, thanks for the info anyway.


Hey guys just wanted to drop a line thanking everyone who contributed. For the current task we kept FPDI/TCPDF with sort of a declarative api we developed on top to place items in given positions. In the same project we used the same stack but instead we went with auto page breaks and rendering html both gave us decent results but it proved to be a cumbersome stack to work with.

Still we got our hands on some of the technologies you guys pointed out so we can use them in real world context for upcoming projects.



Use a Word or OpenDocument template (or another of your choice). Use LibreOffice in headless mode to search and replace the fields (you can use ###VAR1### or whatever you like) in your document by the generated values. Then convert it:

libreoffice --headless --convert-to pdf your-document.docx

That should do.


Well that approach looks interesting too. We'll look into it, thanks :)


I had the same problem a few das Ago, and I found this:

I needed an easy way to generate PDF versions of an article, and this SaaS Tool is really good for that. You can build your layout with HTML / CSS and use this to generate the PDF.


Thanks! Will check the docs with the team and see if it fits =)


ReportingCloud is a Web API that can be used to create PDF documents from MS Word compatible templates. Cheaper than Aspose.

Note: I work for Text Control, makers of ReportingCloud.

Easy enough to use and also comes with wkhtmltoimage, to generate images based on html.

code of conduct - report abuse