in reply to Re^2: Generating pdf file for and from an html file
in thread Generating pdf file for and from an html file

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.

  • Comment on Re^3: Generating pdf file for and from an html file

Replies are listed 'Best First'.
Re^4: Generating pdf file for and from an html file
by kcott (Archbishop) on Apr 13, 2014 at 22:12 UTC
    "No, all three solutions I mentioned are not Perl modules ..."

    Fair enough. Ignore my word of caution and thanks for posting the additional information.

    "... unfortunately my access level doesn't allow me to post links here yet."

    That doesn't sound right at all. As far as I know, there's no restrictions on posting links: anyone at all can do this (even if you're not logged in, i.e. Anonymous Monk).

    The usual way is to use one of the "linking shortcuts". You can use the HTML '<a>' element (see "Perl Monks Approved HTML tags") if you want. In case you weren't aware, there are some non-HTML tags you can also use (see "Writeup Formatting Tips").

    -- Ken

      > The usual way is to use one of the "linking shortcuts". You can use the HTML '<a>' element (see "Perl Monks Approved HTML tags") if you want. In case you weren't aware, there are some non-HTML tags you can also use (see "Writeup Formatting Tips").

      Slightly off topic, but fascinating!

      I just did a cut and paste of the HTML-source of your post and it works! :)

      Cheers Rolf

      ( addicted to the Perl Programming Language)