I found LaTeX to be an enjoyable way to create non-traditional PDFs with better control over styling than you would get from something that rendered HTML to PDF directly, like Prince or WebkitToPdf. The downside was all the Googling and troubleshooting when things didn&#x27;t behave as expected -- LaTeX is pretty much the opposite of WYSIWYG and doesn&#x27;t have Chrome Developer Tools ;-)<p>In my case, I was actually stuck with creating a template for Invoice&#x2F;Order PDFs based on a CRM that was written in PHP, so I made a PHP script that output LaTeX, then rendered that in a folder. The trick was to use a temporary folder for each document render, and to manage the process hands-free using latex-mk: <a href="http:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;210500&#x2F;why-is-something-like-latexmk-needed-or-why-do-we-sometimes-need-to-compile-a-fi" rel="nofollow">http:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;210500&#x2F;why-is-somethi...</a><p>The resulting PDFs then didn&#x27;t break lines in the wrong places, had the correct margins on the first page vs other pages, were very graphically rich with vector graphics, and could be produced quickly on demand through their web-based CRM, all thanks to LaTeX and a few days&#x27; time debugging.