HTML::FormatPS - Format HTML as postscript
require HTML::FormatPS; $html = parse_htmlfile("test.html"); $formatter = new HTML::FormatPS FontFamily => 'Helvetica', PaperSize => 'Letter'; print $formatter->format($html);
The HTML::FormatPS is a formatter that outputs PostScript code. Formatting of HTML tables and forms is not implemented.
You might specify the following parameters when constructing the formatter:
What kind of paper should we format for. The value can be one of these: A3, A4, A5, B4, B5, Letter, Legal, Executive, Tabloid, Statement, Folio, 10x14, Quarto.
The default is "A4".
The width of the paper in points. Setting PaperSize also defines this value.
The height of the paper in points. Setting PaperSize also defines this value.
The left margin in points.
The right margin in points.
Both left and right margin at the same time. The default value is 4 cm.
The top margin in points.
The bottom margin in points.
Both top and bottom margin at the same time. The default value is 2 cm.
The parameter determines if we should put page numbers on the pages. The default is yes, so you have to set this value to 0 in order to suppress page numbers.
The parameter specifies which family of fonts to use for the formatting. Legal values are "Courier", "Helvetica" and "Times". The default is "Times".
All fontsizes might be scaled by this factor.
How much space between lines. This is a factor of the fontsize used for that line. Default is 0.1.
HTML::Formatter
Copyright (c) 1995 Gisle Aas. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Gisle Aas <aas@oslonett.no>
To install LWP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LWP
CPAN shell
perl -MCPAN -e shell install LWP
For more information on module installation, please visit the detailed CPAN module installation guide.