1HTML::FormatRTF(3)    User Contributed Perl Documentation   HTML::FormatRTF(3)
2
3
4

NAME

6       HTML::FormatRTF - Format HTML as RTF
7

SYNOPSIS

9         use HTML::FormatRTF;
10
11         my $out_file = "test.rtf";
12         open(RTF, ">$out_file")
13          or die "Can't write-open $out_file: $!\nAborting";
14
15         print RTF HTML::FormatRTF->format_file(
16           'test.html',
17             'fontname_headings' => "Verdana",
18         );
19         close(RTF);
20

DESCRIPTION

22       HTML::FormatRTF is a class for objects that you use to convert HTML to
23       RTF.  There is currently no proper support for tables or forms.
24
25       This is a subclass of HTML::Formatter, whose documentation you should
26       consult for more information on the new, format, format_file
27
28       You can specify any of the following parameters in the call to "new",
29       "format_file", or "format_string":
30
31       lm  Amount of extra indenting to apply to the left margin, in twips
32           (twentieths of a point). Default is 0.
33
34           So if you wanted the left margin to be an additional half inch
35           larger, you'd set "lm => 720" (since there's 1440 twips in an
36           inch).  If you wanted it to be about 1.5cm larger, you'd set "lw =>
37           850" (since there's about 567 twips in a centimeter).
38
39       rm  Amount of extra indenting to apply to the left margin, in twips
40           (twentieths of a point).  Default is 0.
41
42       normal_halfpoint_size
43           This is the size of normal text in the document, in half-points.
44           The default value is 22, meaning that normal text is in 11 point.
45
46       header_halfpoint_size
47           This is the size of text used in the document's page-header, in
48           half-points. The default value is 17, meaning that normal text is
49           in 7.5 point.  Currently, the header consists just of
50           "p.pagenumber" in the upper-right-hand corner, and cannot be
51           disabled.
52
53       head1_halfpoint_size ... head6_halfpoint_size
54           These control the font size of each heading level, in half-twips.
55           For example, the default for head3_halfpoint_size is 25, meaning
56           that HTML "<h3>...</h3>" text will be in 12.5 point text (in
57           addition to being underlined and in the heading font).
58
59       codeblock_halfpoint_size
60           This controls the font size (in half-points) of the text used for
61           "<pre>...</pre>" text.  By default, it is 18, meaning 9 point.
62
63       fontname_body
64           This option controls what font is to be used for the body of the
65           text -- that is, everything other than heading text and text in
66           pre/code/tt elements. The default value is currently "Times".
67           Other handy values I can suggest using are "Georgia" or "Bookman
68           Old Style".
69
70       fontname_code
71           This option controls what font is to be used for text in
72           pre/code/tt elements. The default value is currently "Courier New".
73
74       fontname_headings
75           This option controls what font name is to be used for headings.
76           You can use the same font as fontname_body, but I prefer a sans-
77           serif font, so the default value is currently "Arial".  Also
78           consider "Tahoma" and "Verdana".
79
80       document_language
81           This option controls what Microsoft language number will be
82           specified as the language for this document. The current default
83           value is 1033, for US English. Consult an RTF reference for other
84           language numbers.
85
86       hr_width
87           This option controls how many underline characters will be used for
88           rendering a "<hr>" tag. Its default value is currently 50. You can
89           usually leave this alone, but under some circumstances you might
90           want to use a smaller or larger number.
91
92       no_prolog
93           If this option is set to a true value, HTML::FormatRTF will make a
94           point of not emitting the RTF prolog before the document.  By
95           default, this is off, meaning that HTML::FormatRTF will emit the
96           prolog.  This option is of interest only to advanced users.
97
98       no_trailer
99           If this option is set to a true value, HTML::FormatRTF will make a
100           point of not emitting the RTF trailer at the end of the document.
101           By default, this is off, meaning that HTML::FormatRTF will emit the
102           bit of RTF that ends the document.  This option is of interest only
103           to advanced users.
104

SEE ALSO

106       HTML::Formatter, RTF::Writer
107
109       Copyright (c) 2002 Sean M. Burke.  All rights reserved.
110
111       This library is free software; you can redistribute it and/or modify it
112       under the same terms as Perl itself.
113
114       This program is distributed in the hope that it will be useful, but
115       without any warranty; without even the implied warranty of
116       merchantability or fitness for a particular purpose.
117

AUTHOR

119       Sean M. Burke "<sburke@cpan.org>"
120
121
122
123perl v5.10.1                      2004-06-02                HTML::FormatRTF(3)
Impressum