1html2ps(1)                  General Commands Manual                 html2ps(1)
2
3
4

NAME

6       html2ps - convert HTML to PostScript
7

SYNOPSIS

9       html2ps [ -2cdDFghHLnORtTuUv ] [ -b URL ] [ -C string ] [ -e encoding ]
10       [ -f file[:file[:...]]  ] [ -i num ] [ -k file ] [ -l lang ] [ -m num ]
11       [  -M num ] [ -N num ] [ -o file ] [ -r path ] [ -s num ] [ -S string ]
12       [ -W string ] [ -x num ] [ URL|file ]
13

DESCRIPTION

15       The program html2ps converts HTML to PostScript. The HTML code  can  be
16       retrieved  from  one or more URL:s or local files, specified as parame‐
17       ters on the command line.  If no parameter is given, html2ps reads from
18       standard input.
19
20       Note:  To avoid unnecessary network traffic, one can rebuild an already
21       generated PostScript file with new options. This  is  done  by  running
22       html2ps with the new options, and with the old PostScript file as input
23       (not applicable for all options).
24

OPTIONS

26       All options have a short (case sensitive), and a  long  (case  insensi‐
27       tive) form.
28
29       -2 --twoup
30              Two column (2-up) output. The default is one column per page.
31
32       -b URL --base URL
33              Use  URL  as  a  base  to expand relative references for in-line
34              images. This is useful if you have downloaded a  document  to  a
35              local file.  The URL should then be the URL of the original doc‐
36              ument.
37
38       -c --check
39              Check the syntax of the HTML  file  (using  an  external  syntax
40              checker). The default is to not make a syntax check.
41
42       -C string --toc string
43              Generate a table of contents (ToC). The value should be a string
44              consisting of one of the letters 'f', 'h',  or  't',  optionally
45              combined with the letter 'b':
46
47              b      The  ToC will be printed first. This requires that Ghost‐
48                     script is installed.
49              f      The ToC will be generated from the links in the converted
50                     document.
51              h      The ToC will be generated from headings and titles in the
52                     converted documents. Note that if the document author for
53                     some strange reason has chosen to use some other means to
54                     represent the headings than the HTML elements  H1,...,H6,
55                     you are out of luck!
56              t      The ToC will be generated from links having the attribute
57                     rev=TOC in the converted document.
58
59       -d --debug
60              Generate debugging  information.  You  should  always  use  this
61              option when reporting problems with html2ps.
62
63       -D --dsc --DSC
64              Generate DSC compliant PostScript. This requires Ghostscript and
65              can take quite some time to do. Note that a PostScript file gen‐
66              erated  with  this option cannot be used as input to html2ps for
67              reformatting later.
68
69       -e encoding --encoding encoding
70              The  document  encoding.   Currently   recognized   values   are
71              ISO-8859-1,  EUC-JP,  SHIFT-JIS,  and  ISO-2022-JP (other EUC-xx
72              encodings may also work). The default is ISO-8859-1.
73
74       -f file[:file[:...]] --rcfile file[:file[:...]]
75              A colon separated  list  of  configuration  file  names  to  use
76              instead    of    the   default   personal   configuration   file
77              $HOME/.html2psrc.  Definitions made in one file override defini‐
78              tions  in  previous files (the last file in the list has highest
79              precedence). An empty file name (as in ':file',  'file1::file3',
80              or  'file:') will expand to the default personal file. The envi‐
81              ronment variable HTML2PSPATH is used to specify the  directories
82              where to search for these files. (Note: this is only supposed to
83              be used on the command line, not in a configuration file.)
84
85       -F --frame
86              Draw a frame around the text on each page. The default is to not
87              draw a frame.
88
89       -g --grayscale
90              Convert  colour  images to grayscale images. Note that the Post‐
91              Script file will be smaller when the  images  are  converted  to
92              grayscale. The default is to generate colour images.
93
94       -h --help
95              Show usage information.
96
97       -H --hyphenate
98              Hyphenate the text. This requires TeX hyphenation pattern files.
99
100       -i num --scaleimage num
101              Scale in-line images with a factor num The default is 1.
102
103       -k file --cookie file
104              Enable  cookie  support,  using a netscape formatted cookie file
105              (requires libwww-perl).
106
107       -l lang --language lang
108              Specifies the language of the document  (overrides  an  eventual
109              LANG  attribute  of  the  BODY element).  The language should be
110              given according to RFC1766 (ftp://ftp.nordu.net/rfc/rfc1766.txt)
111              and ISO 639 (http://www.w3.org/WAI/ER/IG/ert/iso639.htm).
112
113       -L --landscape
114              Generate  code  for  printing  in landscape mode. The default is
115              portrait mode.
116
117       -m num --scalemath num
118              Scale mathematical formulas with a factor num The default is 1.
119
120       -M num --mainchapter num
121              Specifies the start number for automatic numbering  of  headings
122              (by setting the seq-number parameter), the default is 1.
123
124       -n --number
125              Insert page numbers. The default is to not number the pages.
126
127       -N num --startno num
128              Specifies the starting page number, the default is 1.
129
130       -o file --output file
131              Write  the  PostScript code to file.  The default is to write to
132              standard output.
133
134       -O --original
135              Use PostScript original images if they exist. For example, if  a
136              document contains an image figure.gif, and an encapsulated Post‐
137              Script file named figure.ps exists in the same  directory,  that
138              file  will  be use instead. This only work for documents read as
139              local files. Note: if the PostScript file is large  or  contains
140              bitmap images, this must be combined with the -D option. In HTML
141              4.0 this can be achieved in a much better way with:
142
143              <OBJECT data="figure.ps" type="application/postscript">
144              <OBJECT data="figure.gif" type="image/gif">
145              <PRE>[Maybe some ASCII art for text browsers]</PRE>
146              </OBJECT>
147              </OBJECT>
148
149       -r path --rootdir path
150              When a document is read from a local file, this value  specifies
151              a base directory for resolving relative links starting with "/".
152              Typically, this should be the directory where your web  server's
153              home page resides.
154
155       -R --xref
156              Insert  cross references at every link to within the set of con‐
157              verted documents.
158
159       -s num --scaledoc num
160              Scale the entire document with a factor num The default is 1.
161
162       -S string --style string
163              This option complements/overrides definitions made in  the  con‐
164              figuration  files. The string must follow the configuration file
165              syntax. (Note: this is only supposed to be used on  the  command
166              line, not in a configuration file.)
167
168       -t --titlepage
169              Generate a title page. The default is to not generate one.
170
171       -T --text
172              Text mode, ignore images. The default is to include the images.
173
174       -u --underline
175              Underline text that constitutes a hypertext link. The default is
176              to not underline.
177
178       -U --colour
179              Produce colour output for text and background,  when  specified.
180              The  default is black text on white background (mnemonic: coloUr
181              ;-).
182
183       -v --version
184              Print information about the current version of html2ps.
185
186       -W string --web string
187              Process a web of documents by recursively retrieve  and  convert
188              documents that are referenced with hyperlinks. When dealing with
189              remote documents it  will  of  course  be  necessary  to  impose
190              restrictions,  to  avoid downloading the entire web... The value
191              should be a string consisting of one of the  letters  'a',  'b',
192              'l',  'r', or 's', optionally combined with a combination of the
193              letters 'p', 'L', and a positive integer:
194
195              a      Follow all links.
196              b      Follow only links to within the same directory, or below,
197                     as the start document.
198              l      Follow only links specified with "<LINK rel=NEXT>" in the
199                     document.
200              p      Prompt for each remote document. This mode will automati‐
201                     cally be entered after the first 50 documents.
202              r      Follow only relative links.
203              s      Follow  only links to within the same server as the start
204                     document.
205              L      With this option, the order in which  the  documents  are
206                     processed  will  be:  first all top level documents, then
207                     the documents linked to from these etc. For  example,  if
208                     the  document A has links to B and C, and B has a link to
209                     D, the order will be A-B-C-D.  By default, each  document
210                     will  be  followed by the first document it links to etc;
211                     so the default order for the example is A-B-D-C.
212              #      A positive integer giving the number of recursive levels.
213                     The default is 4 (when the option is present).
214
215       -x num --duplex num
216              Generate  postscript  code  for single or double sided printing.
217              No default, valid values are:
218
219              0      Single sided.
220              1      Double sided.
221              2      Double sided, opposite page reversed (tumble mode).
222

BUGS

224       (This is incomplete.)
225
226       The CELLSPACING attribute of the TABLE element is  not  implemented  as
227       described  in  the  specification; instead the value of the CELLPADDING
228       attribute is increased by half the value of CELLSPACING.
229
230       Rendering HTML tables well is a non-trivial task.  For  "real"  tables,
231       that  is representation of tabular data, html2ps usually generates rea‐
232       sonably good output. When tables are  used  for  layout  purposes,  the
233       result  varies  from  good  to useless. This is because a table cell is
234       never broken across pages. So if a table contains a cell with a lot  of
235       content,  the  entire table may have to be scaled down in size in order
236       to make this cell fit on a single page. Sometimes this may even  result
237       in unreadable output.
238
239       Page  breaks  are occasionally done in bad places: for example directly
240       after a (long) heading, and before the last line in a paragraph.
241

ENVIRONMENT

243       HTML2PSPATH
244              This variable specifies the directories to search for configura‐
245              tion  files.  It  should  be a colon separated list of directory
246              names. Use a dot '.' to denote the current directory.  An  empty
247              directory  name  (as  in  ':dir',  'dir1::dir3', or 'dir:') will
248              expand to the directory where the global configuration file  is.
249              The default value is '.:', that is: search the current directory
250              first, and then the global one.
251
252

FILES

254       $HOME/.html2psrc
255              User configuration file, see html2psrc(5).
256

SEE ALSO

258       html2psrc(5), perl(1), setlocale(3), strftime(3), weblint(1)
259

VERSION

261       This manpage describes html2ps version 1.0 beta7.
262

AVAILABILITY

264       http://user.it.uu.se/~jan/html2ps.html
265

AUTHOR

267       Jan Karrman (jan@it.uu.se)
268
269
270
271
2724th Berkeley Distribution          7 May 2010                       html2ps(1)
Impressum