++ed by:
CKRAS

1 PAUSE user
1 non-PAUSE user.

☺唐鳳☻

NAME

PDF::FromHTML - Convert HTML documents to PDF

VERSION

This document describes version 0.12 of PDF::FromHTML, released December 10, 2005.

SYNOPSIS

    my $pdf = PDF::FromHTML->new( encoding => 'utf-8' );
    $pdf->load_file('source.html');
    $pdf->convert(
        Font => '/path/to/font.ttf',
        LineHeight => 10,
        Landscape => 1,
    );
    $pdf->write_file('target.pdf');

DESCRIPTION

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.

PUBLIC METHODS

convert(%params)

Convert the loaded file to PDF. Valid parameters are:

    PageWidth         640
    PageResolution    540
    FontBold          'HelveticaBold'
    FontOblique       'HelveticaOblique'
    FontBoldOblique   'HelveticaBoldOblique'
    LineHeight        12
    FontUnicode       'Helvetica'
    Font              (same as FontUnicode)
    PageSize          'A4'
    Landscape         0

HINTS & TIPS

<img> tags

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.

SEE ALSO

PDF::FromHTML::Twig, PDF::Template, XML::Twig.

AUTHORS

Audrey Tang <autrijus@autrijus.org>

CONTRIBUTORS

Charleston Software Associates <info@charletonsw.com>

COPYRIGHT

Copyright 2004, 2005 by Audrey Tang <autrijus@autrijus.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html