No, all three solutions I mentioned are not Perl modules but C/C++ tools. See docfrac.net for Docfrac and try googling the other two tools - unfortunately my access level doesn't allow me to post links here yet.

Used all three of these in my projects (well, PHP projects to be clear but not much difference for this matter), they have some quirks but generally work. wkhtmltopdf is the most advanced one (basicly it's a full-featured WebKit-based browser with PDF exporting option) but it tends to render images instead of text which may be not what you want. Docfrac and HTMLDOC, on the other hand, are HTML parsers/renderers, their output PDF is better structured but support for formatting is very limited.

And, generally speaking, the task of converting HTML to a picture (PNG, JPEG, PDF, etc) falls rather out of Perl's scope - it's not impossible to implement a decent layout engine in Perl but, well, performance would be a disaster and amount of work incredible.


In reply to Re^3: Generating pdf file for and from an html file by jmacloue
in thread Generating pdf file for and from an html file by RenardBleu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.