1HTML::FormatText(3) User Contributed Perl Documentation HTML::FormatText(3)
2
3
4
6 HTML::FormatText - Format HTML as plaintext
7
9 require HTML::TreeBuilder;
10 $tree = HTML::TreeBuilder->new->parse_file("test.html");
11
12 require HTML::FormatText;
13 $formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50);
14 print $formatter->format($tree);
15
17 The HTML::FormatText is a formatter that outputs plain latin1 text.
18 All character attributes (bold/italic/underline) are ignored. Format‐
19 ting of HTML tables and forms is not implemented.
20
21 You might specify the following parameters when constructing the for‐
22 matter:
23
24 leftmargin (alias lm)
25 The column of the left margin. The default is 3.
26
27 rightmargin (alias rm)
28 The column of the right margin. The default is 72.
29
31 HTML::Formatter
32
34 Copyright (c) 1995-2002 Gisle Aas, and 2002- Sean M. Burke. All rights
35 reserved.
36
37 This library is free software; you can redistribute it and/or modify it
38 under the same terms as Perl itself.
39
40 This program is distributed in the hope that it will be useful, but
41 without any warranty; without even the implied warranty of mer‐
42 chantability or fitness for a particular purpose.
43
45 Current maintainer: Sean M. Burke <sburke@cpan.org>
46
47 Original author: Gisle Aas <gisle@aas.no>
48
49
50
51perl v5.8.8 2004-06-02 HTML::FormatText(3)