This simple document aims to show just how easy it is to generate PDFs from HTML+CSS using Prince. The document mostly uses Prince's built in styles for HTML, but it also applies some custom styles. The custom styles: center the title and subtitle, choose fonts and specify the style for the hello world exclamation below.
Our hypothesis is that generating PDFs using Prince is easy.
By using a simple document containing only
tags and a simple stylesheet we will generate a PDF that looks good.
$ prince style.css lab_report.html
If you're currently looking at a PDF file then this works.
The resulting file includes a title and subtitle (centered), a list of the apparatus needed. The resulting file uses a sensible-looking a sans-serif font except for the code tags which use a monospace font and the Hello World exclamation which has serifs.