Custom theme for PDF export


Really like Grav, I’d like to start using it for some sort of knowledge base/support articles, just like you did with I want to offer the user a downloadable manual in PDF with all the support articles combined. Therefore I want to create a theme that outputs all the support articles with an index. For the site a theme similar to will be used. As soon as the user presses the Grav should switch theme on the fly so that the HTML of the PDF theme can be used for the PDF. Would something like this be possible?

I’ve not attempted this but I do know there is an open source package from KnpLabs that provides PDF export capabilities from Twig.

Theoretically this is completely possible :slight_smile:

I am also interested in downloading posts in pdf format.
I read the bundle recommended, however:

  1. composer ok;
  2. where you enable the kernel? (KnpLabs says “app / AppKernel.php”)
  3. where you enable the binary program wkhtmltopdf? (KnpLabs says “app / config / config.yml”)
  4. and finally, where to put this controller: