Section: User Contributed Perl Documentation (3pm)
use HTML::TreeBuilder; $tree = HTML::TreeBuilder->new->parse_file("test.html"); use HTML::FormatPS; $formatter = HTML::FormatPS->new( FontFamily => 'Helvetica', PaperSize => 'Letter', ); print $formatter->format($tree);
Or, for short:
use HTML::FormatPS; print HTML::FormatPS->format_file( "test.html", 'FontFamily' => 'Helvetica', 'PaperSize' => 'Letter', );
The HTML::FormatPS is a formatter that outputs PostScript code. Formatting of HTML tables and forms is not implemented.
HTML::FormatPS is built on top of HTML::Formatter and so further detail may be found in the documentation for HTML::Formatter.
You might specify the following parameters when constructing the formatter object (or when calling format_file or format_string):
The default is ``A4''.
For example, if you want everything to be almost three times as large, you could set this to 2.7. If you wanted things just a bit smaller than normal, you could set it to .92.
my $formatter = FormatterClass->new( option1 => value1, option2 => value2, ... );
You can make new bug reports, and view existing ones, through the web interface at <http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format>.
The project homepage is <https://metacpan.org/release/HTML-Format>.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you, or see <https://metacpan.org/module/HTML::Format/>.
This software is copyright (c) 2013 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Tutoriais de Tecnologia Web