This is something I have been looking for as well. Unfortunately, there is no such utility (that I have found) to convert HTML to PDF with CSS support. Here are the utilities that I have come across that you may be interested in:
HTMLDoc - Provides a free version (which you must compile form source or find a binary on the internet, which the provide links to) and a commercial version. Provides basic HTML support (no CSS), with some limitations (for instance - try using tables within tables to layout your pages). There is a corresponding perl
module to interact with HTMLDoc.
html2ps - Converts html to postscript - not sure if supports conversion to pdf as well.
A possible alternative is to use the
Gtk2::MozEmbed to render the html and print to then print to PDF. I was not able to get Gtk2::MozEmbed to work on windows (if anybody has, please contact me).
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.