Manual Reference Pages - PDF::FROMHTML (3)
PDF::FromHTML - Convert HTML documents to PDF
my $pdf = PDF::FromHTML->new( encoding => utf-8 );
# Loading from a file:
# Or from a scalar reference:
# Perform the actual conversion:
# With PDF::API2, font names such as traditional also works
Font => font.ttf,
LineHeight => 10,
Landscape => 1,
# Write to a file:
# Or to a scalar reference:
This module transforms HTML into PDF, using an assortment of XML
transformations implemented in PDF::FromHTML::Twig.
There is also a command-line utility, html2pdf.pl, that comes
with this distribution.
Convert the loaded file to PDF. Valid parameters are:
Font (same as FontUnicode)
HINTS & TIPS
Add the height and width attributes if you are creating the source HTML,
it keeps PDF::FromHTML from having to open and read the source image file
to get the real size. Less file I/O means faster processing.
Although <B>PDF::FromHTMLB> will work with both HTML and XHTML formats,
it is not designed to utilise CSS.
This means any HTML using external or inline CSS for design and
layout, including but not limited to: images, backgrounds, colours,
fonts etc... will not be converted into the PDF.
To get an idea of the likely resulting PDF, you may wish to use an
non-CSS capable browser for testing first.
There is currently no plan to adapt this module to utilise CSS.
(Patches welcome, though!)
html2pdf.pl is a simple command-line interface to this module.
PDF::FromHTML::Twig, PDF::Template, XML::Twig.
Charleston Software Associates <firstname.lastname@example.org>
CC0 1.0 Universal
To the extent possible under law, XX has waived all copyright and related
or neighboring rights to PDF-FromHTML.
This work is published from Taiwan.
Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 251:
Non-ASCII character seen before =encoding in XX. Assuming UTF-8
|perl v5.20.3 ||PDF::FROMHTML (3) ||2010-01-08 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.