HTML::FormatPS - Format HTML as postscript
require HTML::TreeBuilder; $tree = HTML::TreeBuilder->new->parse_file("test.html"); require HTML::FormatPS; $formatter = new HTML::FormatPS FontFamily => 'Helvetica', PaperSize => 'Letter'; print $formatter->format($tree);
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.
Copyright (c) 1995-1998 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 <firstname.lastname@example.org>