Added export PDF functionality
Just remembered this PR, Looks like margins and syntax highlighting is not exported properly, maybe it is possible to fix it?
Using wkhtmltopdf is always tricky, you might want to check the manual, there are a few options for setting document margins and other interesting details:
...
-B, --margin-bottom <unitreal> Set the page bottom margin
-L, --margin-left <unitreal> Set the page left margin (default 10mm)
-R, --margin-right <unitreal> Set the page right margin (default 10mm)
-T, --margin-top <unitreal> Set the page top margin
...
Regarding to syntax highlight, you might need to check if the current syntax highlighter CSS is restricted to @media screen, as that CSS is not rendered if you "print" the document.
There are also some CSS tricks that might be useful
In Rails, there are some gems to use wkhtml2pdf in a friendlier manner: wicked_pdf and pdfkit. If we end up doing the effort to get this right, it might be useful to have a wrapper library for haskell. There's even a C library that could be used to make a cleaner integration, I can't wait for the fun :-D