227 lines
7.4 KiB
HTML
227 lines
7.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of HTML::FormatRTF</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>HTML::FormatRTF</H1>
|
|
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2016-12-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
HTML::FormatRTF - Format HTML as RTF
|
|
<A NAME="lbAC"> </A>
|
|
<H2>VERSION</H2>
|
|
|
|
|
|
|
|
version 2.12
|
|
<A NAME="lbAD"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
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);
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
HTML::FormatRTF is a class for objects that you use to convert <FONT SIZE="-1">HTML</FONT> to <FONT SIZE="-1">RTF.</FONT>
|
|
There is currently no proper support for tables or forms.
|
|
<P>
|
|
|
|
This is a subclass of HTML::Formatter, whose documentation you should
|
|
consult for more information on underlying methods such as <TT>"new"</TT>, <TT>"format"</TT>,
|
|
<TT>"format_file"</TT> etc
|
|
<P>
|
|
|
|
You can specify any of the following parameters in the call to <TT>"new"</TT>,
|
|
<TT>"format_file"</TT>, or <TT>"format_string"</TT>:
|
|
<DL COMPACT>
|
|
<DT id="1">lm<DD>
|
|
|
|
|
|
Amount of <I>extra</I> indenting to apply to the left margin, in twips
|
|
(<I>tw</I>ent<I>i</I>eths of a <I>p</I>oint). Default is 0.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
So if you wanted the left margin to be an additional half inch larger, you'd
|
|
set <TT>"lm => 720"</TT> (since there's 1440 twips in an inch). If you wanted it to
|
|
be about 1.5cm larger, you'd set <TT>"lw => 850"</TT> (since there's about 567
|
|
twips in a centimeter).
|
|
<DT id="2">rm<DD>
|
|
|
|
|
|
Amount of <I>extra</I> indenting to apply to the left margin, in twips
|
|
(<I>tw</I>ent<I>i</I>eths of a <I>p</I>oint). Default is 0.
|
|
<DT id="3">normal_halfpoint_size<DD>
|
|
|
|
|
|
This is the size of normal text in the document, in <I>half</I>-points. The default
|
|
value is 22, meaning that normal text is in 11 point.
|
|
<DT id="4">header_halfpoint_size<DD>
|
|
|
|
|
|
This is the size of text used in the document's page-header, in <I>half</I>-points.
|
|
The default value is 17, meaning that normal text is in 7.5 point. Currently,
|
|
the header consists just of "p. <I>pagenumber</I>" in the upper-right-hand corner,
|
|
and cannot be disabled.
|
|
<DT id="5">head1_halfpoint_size ... head6_halfpoint_size<DD>
|
|
|
|
|
|
These control the font size of each heading level, in half-twips. For example,
|
|
the default for head3_halfpoint_size is 25, meaning that <FONT SIZE="-1">HTML </FONT><TT>"<h3>...</h3>"</TT> text will be in 12.5 point text (in addition to being underlined and in the
|
|
heading font).
|
|
<DT id="6">codeblock_halfpoint_size<DD>
|
|
|
|
|
|
This controls the font size (in half-points) of the text used for <TT>"<pre>...</pre>"</TT> text. By default, it is 18, meaning 9 point.
|
|
<DT id="7">fontname_body<DD>
|
|
|
|
|
|
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 currently ``Times''. Other handy values I can suggest using are
|
|
``Georgia'' or ``Bookman Old Style''.
|
|
<DT id="8">fontname_code<DD>
|
|
|
|
|
|
This option controls what font is to be used for text in pre/code/tt elements.
|
|
The default value is currently ``Courier New''.
|
|
<DT id="9">fontname_headings<DD>
|
|
|
|
|
|
This option controls what font name is to be used for headings. You can use
|
|
the same font as fontname_body, but I prefer a sans-serif font, so the default
|
|
value is currently ``Arial''. Also consider ``Tahoma'' and ``Verdana''.
|
|
<DT id="10">document_language<DD>
|
|
|
|
|
|
This option controls what Microsoft language number will be specified as the
|
|
language for this document. The current default value is 1033, for <FONT SIZE="-1">US</FONT> English.
|
|
Consult an <FONT SIZE="-1">RTF</FONT> reference for other language numbers.
|
|
<DT id="11">hr_width<DD>
|
|
|
|
|
|
This option controls how many underline characters will be used for rendering a
|
|
``<hr>'' tag. Its default value is currently 50. You can usually leave this
|
|
alone, but under some circumstances you might want to use a smaller or larger
|
|
number.
|
|
<DT id="12">no_prolog<DD>
|
|
|
|
|
|
If this option is set to a true value, HTML::FormatRTF will make a point of
|
|
<I>not</I> emitting the <FONT SIZE="-1">RTF</FONT> prolog before the document. By default, this is off,
|
|
meaning that HTML::FormatRTF <I>will</I> emit the prolog. This option is of
|
|
interest only to advanced users.
|
|
<DT id="13">no_trailer<DD>
|
|
|
|
|
|
If this option is set to a true value, HTML::FormatRTF will make a point of
|
|
<I>not</I> emitting the <FONT SIZE="-1">RTF</FONT> trailer at the end of the document. By default, this
|
|
is off, meaning that HTML::FormatRTF <I>will</I> emit the bit of <FONT SIZE="-1">RTF</FONT> that ends the
|
|
document. This option is of interest only to advanced users.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
HTML::Formatter, RTF::Writer
|
|
<A NAME="lbAG"> </A>
|
|
<H2>INSTALLATION</H2>
|
|
|
|
|
|
|
|
See perlmodinstall for information and options on installing Perl modules.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUGS AND LIMITATIONS</H2>
|
|
|
|
|
|
|
|
You can make new bug reports, and view existing ones, through the
|
|
web interface at <<A HREF="http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format">http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format</A>>.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
|
|
|
|
The project homepage is <<A HREF="https://metacpan.org/release/HTML-Format">https://metacpan.org/release/HTML-Format</A>>.
|
|
<P>
|
|
|
|
The latest version of this module is available from the Comprehensive Perl
|
|
Archive Network (<FONT SIZE="-1">CPAN</FONT>). Visit <<A HREF="http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</A>> to find a <FONT SIZE="-1">CPAN</FONT>
|
|
site near you, or see <<A HREF="https://metacpan.org/module/HTML::Format/">https://metacpan.org/module/HTML::Format/</A>>.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="14">•<DD>
|
|
Nigel Metheringham <<A HREF="mailto:nigelm@cpan.org">nigelm@cpan.org</A>>
|
|
<DT id="15">•<DD>
|
|
Sean M Burke <<A HREF="mailto:sburke@cpan.org">sburke@cpan.org</A>>
|
|
<DT id="16">•<DD>
|
|
Gisle Aas <<A HREF="mailto:gisle@ActiveState.com">gisle@ActiveState.com</A>>
|
|
</DL>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>COPYRIGHT AND LICENSE</H2>
|
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
|
|
<P>
|
|
|
|
This is free software; you can redistribute it and/or modify it under
|
|
the same terms as the Perl 5 programming language system itself.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="18"><A HREF="#lbAC">VERSION</A><DD>
|
|
<DT id="19"><A HREF="#lbAD">SYNOPSIS</A><DD>
|
|
<DT id="20"><A HREF="#lbAE">DESCRIPTION</A><DD>
|
|
<DT id="21"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
<DT id="22"><A HREF="#lbAG">INSTALLATION</A><DD>
|
|
<DT id="23"><A HREF="#lbAH">BUGS AND LIMITATIONS</A><DD>
|
|
<DT id="24"><A HREF="#lbAI">AVAILABILITY</A><DD>
|
|
<DT id="25"><A HREF="#lbAJ">AUTHORS</A><DD>
|
|
<DT id="26"><A HREF="#lbAK">COPYRIGHT AND LICENSE</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:45 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|