Generate PDF file from HTML page

Hi !

I have customized one of my view pages with some div and tables.

What is the best way to generate a PDF file from my page?

1 Like

The 2 main ways to achieve what you want:

  • Generate a PDF from HTML via e.g. wkhtmltopdf
  • Generate a PDF via a PHP library (and its custom commands) manualy. There are loads of different librarys like

There is no “best” library because it all depends on what you want to achieve. Some may be better suited for your needs than others.

Thanks for your help. I ll try it

You can also check this GitHub - FriendsOfCake/CakePdf: CakePHP plugin for creating and/or rendering PDFs, supporting several popular PDF engines.