Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Hasnainali9's avatar

Complex PDF Generation Issue

Hey just need a suggestion as I'm using dompdf to generate pdf but am unable to generate the correct style as far as my research dompdf won't render complex style . Need suggestion to generate the same design(without using a print function). Please note that the system will be deployed on a shared server. So using headless chrome is not be a solution in my opinion.

0 likes
7 replies
fylzero's avatar

@hasnainali9 I'm afraid if there were a good answer to this headless Chrome options wouldn't exist. Either deploy on a server you have more control over... or possibly use a 3rd-party print API service like https://www.paperplane.app/ (I'm sure there are others). These are usually paid services / not really convenient if you're trying to save $$$.

1 like
Hasnainali9's avatar

@bugsysha the series covers the basics of creating an invoice which can easily be created through dompdf as well. Please look at this URL https://we.tl/t-H1Mzf5sLL6 I want the exact same design to be created. I have tried basic pdf creators but they won't export exact same design.

Hasnainali9's avatar

@Sinnbeck Thanks but the issue here is the app will be deployed to shared hosting with no node access to it mean you won't have access to node Binaries.

Sinnbeck's avatar

@Hasnainali9 Ok. Personally I would use a cheap server like Digital Ocean droplets or similar, to have full control of the server.

But if that isnt possible, you just need to reduce the complexity of the PDF so it can work with dompdf, or use an external service as suggested by @fylzero

Please or to participate in this conversation.