HTML::FormatRTF(3)
π NAME π
okay bestie, welcome to the manual page for HTML::FormatRTF β Format HTML as RTF β¨
πΈ VERSION πΈ
this is version 2.16, periodt π
π¦ SYNOPSIS π¦
use HTML::FormatRTF;
my $out_file = "test.rtf";
open(RTF, ">$out_file")
or die "Can't write-open $out_file: $!\nAborting";
print RTF HTML::FormatRTF->format_file(
'test.html',
'fontname_headings' => "Verdana",
);
close(RTF);
π DESCRIPTION π
okay so HTML::FormatRTF is literally a class for objects that you use to convert HTML to RTF. quick vibe check though: there is currently no proper support for tables or forms π
itβs a subclass of HTML::Formatter, and you should consult that documentation for more info on underlying methods such as new, format, format_file, etc. fr fr, thatβs where the lore lives π«Ά
you can specify any of the following parameters in the call to new, format_file, or format_string:
lmβ amount of extra indenting to apply to the left margin, in twips (twentieths of a point). default is0. so if you wanted the left margin to be an additional half inch larger, youβd setlm => 720(since thereβs 1440 twips in an inch). if you wanted it to be about 1.5cm larger, youβd setlw => 850(since thereβs about 567 twips in a centimeter). yes bestie, thatβs exactly what it says πrmβ amount of extra indenting to apply to the left margin, in twips (twentieths of a point). default is0.normal_halfpoint_sizeβ this is the size of normal text in the document, in half-points. the default value is22, meaning that normal text is in 11 point.header_halfpoint_sizeβ this is the size of text used in the documentβs page-header, in half-points. the default value is17, meaning that normal text is in 7.5 point. currently, the header consists just ofp. pagenumberin the upper-right-hand corner, and cannot be disabled. iconic, but also a little unhinged πhead1_halfpoint_size ... head6_halfpoint_sizeβ these control the font size of each heading level, in half-twips. for example, the default forhead3_halfpoint_sizeis25, meaning that HTML<h3>...</h3>text will be in 12.5 point text (in addition to being underlined and in the heading font). slay πcodeblock_halfpoint_sizeβ this controls the font size (in half-points) of the text used for<pre>...</pre>text. by default, it is18, meaning 9 point.fontname_bodyβ this option controls what font is to be used for the body of the text β that is, everything other than heading text and text in pre/code/tt elements. the default value is currentlyTimes. other handy values I can suggest using areGeorgiaorBookman Old Style.fontname_codeβ this option controls what font is to be used for text in pre/code/tt elements. the default value is currentlyCourier New.fontname_headingsβ this option controls what font name is to be used for headings. you can use the same font asfontname_body, but I prefer a sans-serif font, so the default value is currentlyArial. also considerTahomaandVerdana.document_languageβ this option controls what Microsoft language number will be specified as the language for this document. the current default value is1033, for US English. consult an RTF reference for other language numbers.hr_widthβ this option controls how many underline characters will be used for rendering a<hr>tag. its default value is currently50. you can usually leave this alone, but under some circumstances you might want to use a smaller or larger number.no_prologβ if this option is set to a true value,HTML::FormatRTFwill make a point of not emitting the RTF prolog before the document. by default, this is off, meaning thatHTML::FormatRTFwill emit the prolog. this option is of interest only to advanced users.no_trailerβ if this option is set to a true value,HTML::FormatRTFwill make a point of not emitting the RTF trailer at the end of the document. by default, this is off, meaning thatHTML::FormatRTFwill emit the bit of RTF that ends the document. this option is of interest only to advanced users.
π SEE ALSO π
go read HTML::Formatter and RTF::Writer, bestie π¦
π AUTHORS π
- Nigel Metheringham β
<nigelm@cpan.org> - Sean M Burke β
<sburke@cpan.org> - Gisle Aas β
<gisle@ActiveState.com>
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2016 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.
okay bye bestie β this page comes from perl v5.40.2, dated 2023-07-03, for HTML::FormatRTF(3) π«Άβ¨
π¦ where this page comes from
- alpine 3.22: perl-html-formatter-doc 2.16-r3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms