File: html2ps.1

package info (click to toggle)
html2ps 1.0b7-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,208 kB
  • sloc: perl: 4,539; tcl: 1,799; sh: 38; makefile: 4
file content (367 lines) | stat: -rw-r--r-- 10,364 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
.\" @(#)html2ps.1
.\"
.TH html2ps 1 " 7 May 2010" "Autogenerated"
.UC 4
.SH NAME
html2ps \- convert HTML to PostScript
.SH SYNOPSIS
.B html2ps
[
.B \-2cdDFghHLnORtTuUv
] [
.BI \-b " URL"
] [
.BI \-C " string"
] [
.BI \-e " encoding"
] [
.BI \-f " file[:file[:...]]"
] [
.BI \-i " num"
] [
.BI \-k " file"
] [
.BI \-l " lang"
] [
.BI \-m " num"
] [
.BI \-M " num"
] [
.BI \-N " num"
] [
.BI \-o " file"
] [
.BI \-r " path"
] [
.BI \-s " num"
] [
.BI \-S " string"
] [
.BI \-W " string"
] [
.BI \-x " num"
] [
.IR URL|file
]
.SH DESCRIPTION
The program
.B html2ps
converts HTML to PostScript. The HTML code can be retrieved from one or more
URL:s or local files, specified as parameters on the command line.
If no parameter is given, html2ps reads from standard input.
.PP
Note: To avoid unnecessary network traffic,
one can rebuild an already generated PostScript file with new
options. This is done by running html2ps with the new options, and with
the old PostScript file as input (not applicable for all options).
.SH OPTIONS
All options have a short (case sensitive), and a long (case insensitive) form.
.TP
.B -2 --twoup 
Two column (2-up) output. The default is one column per page.
.TP
.B \-b \fIURL\fP  --base \fIURL\fP
Use
.I URL
as a base to expand relative references for in-line
images. This is useful if you have downloaded a document to a local file.
The
.I URL
should then be the
.I URL
of the original document.
.TP
.B -c --check 
Check the syntax of the HTML file (using an external syntax
checker). The default is to not make a syntax check.
.TP
.B \-C \fIstring\fP  --toc \fIstring\fP
Generate a table of contents (ToC). The value should be a string
consisting of one of the letters 'f', 'h', or 't', optionally combined
with the letter 'b':
.LP
.RS
.PD 0
.TP
.B b
The ToC will be printed first. This requires that Ghostscript is
installed.
.TP
.B f
The ToC will be generated from the links in the converted document.
.TP
.B h
The ToC will be generated from headings and
titles in the converted documents. Note that if the document author
for some strange reason has chosen to use some other means to represent
the headings than the HTML elements H1,...,H6, you are out of luck!
.TP
.B t
The ToC will be generated from links having the attribute
rev=TOC in the converted document.
.RE
.PD
.PP
.TP
.B -d --debug 
Generate debugging information. You should always use this
option when reporting problems with html2ps.
.TP
.B -D --dsc --DSC 
Generate DSC compliant PostScript. This requires Ghostscript and
can take quite some time to do. Note that a PostScript file generated
with this option cannot be used as input to html2ps for reformatting
later.
.TP
.B \-e \fIencoding\fP  --encoding \fIencoding\fP
The document encoding. Currently recognized values are ISO-8859-1,
EUC-JP, SHIFT-JIS, and ISO-2022-JP (other EUC-xx encodings may also
work). The default is ISO-8859-1.
.TP
.B \-f \fIfile[:file[:...]]\fP  --rcfile \fIfile[:file[:...]]\fP
A colon separated list of configuration file names to use
instead of the default personal configuration file $HOME/.html2psrc.
Definitions made in one file override definitions in previous files
(the last file in the list has highest precedence). An empty file
name (as in ':file', 'file1::file3', or 'file:') will expand to the
default personal file. The environment variable HTML2PSPATH is used
to specify the directories where to search for these files. (Note:
this is only supposed to be used on the command line, not
in a configuration file.)
.TP
.B -F --frame 
Draw a frame around the text on each page. The default is
to not draw a frame.
.TP
.B -g --grayscale 
Convert colour images to grayscale images. Note that the
PostScript file will be smaller when the images are converted to
grayscale. The default is to generate colour images.
.TP
.B -h --help 
Show usage information.
.TP
.B -H --hyphenate 
Hyphenate the text. This requires TeX
hyphenation pattern files.
.TP
.B \-i \fInum\fP  --scaleimage \fInum\fP
Scale in-line images with a factor
.I num
.
The default is 1.
.TP
.B \-k \fIfile\fP  --cookie \fIfile\fP
Enable cookie support, using a netscape formatted cookie
.I file
(requires libwww-perl).
.TP
.B \-l \fIlang\fP  --language \fIlang\fP
Specifies the language of the document
(overrides an eventual LANG attribute of the BODY element).
The language should be given according to
RFC1766 (ftp://ftp.nordu.net/rfc/rfc1766.txt) and
ISO 639 (http://www.w3.org/WAI/ER/IG/ert/iso639.htm).
.TP
.B -L --landscape 
Generate code for printing in landscape mode. The default
is portrait mode.
.TP
.B \-m \fInum\fP  --scalemath \fInum\fP
Scale mathematical formulas with a factor
.I num
.
The default is 1.
.TP
.B \-M \fInum\fP  --mainchapter \fInum\fP
Specifies the start number for automatic numbering of headings
(by setting the seq-number parameter), the default is 1.
.TP
.B -n --number 
Insert page numbers. The default is to not number the pages.
.TP
.B \-N \fInum\fP  --startno \fInum\fP
Specifies the starting page number, the default is 1.
.TP
.B \-o \fIfile\fP  --output \fIfile\fP
Write the PostScript code to
.I file.
The default is
to write to standard output.
.TP
.B -O --original 
Use PostScript original images if they exist. For example, if a
document contains an image figure.gif, and an encapsulated PostScript
file named figure.ps exists in the same directory, that file will be
use instead. This only work for documents read as local files. Note:
if the PostScript file is large or contains bitmap images, this must
be combined with the -D option. In HTML 4.0 this can be achieved in a
much better way with:
.RS
.PD
.PP
.PD 0
.PP
<OBJECT data="figure.ps" type="application/postscript">
.PP
<OBJECT data="figure.gif" type="image/gif">
.PP
<PRE>[Maybe some ASCII art for text browsers]</PRE>
.PP
</OBJECT>
.PP
</OBJECT>
.RE
.PD
.PP
.TP
.B \-r \fIpath\fP  --rootdir \fIpath\fP
When a document is read from a local file, this value specifies
a base directory for resolving relative links starting with "/".
Typically, this should be the directory where your web server's home
page resides.
.TP
.B -R --xref 
Insert cross references at every link to
within the set of converted documents.
.TP
.B \-s \fInum\fP  --scaledoc \fInum\fP
Scale the entire document with a factor
.I num
.
The default is 1.
.TP
.B \-S \fIstring\fP  --style \fIstring\fP
This option complements/overrides definitions made in the
configuration files. The
.I string
must follow the configuration
file syntax. (Note: this is only supposed to be used on the
command line, not in a configuration file.)
.TP
.B -t --titlepage 
Generate a title page. The default is to not generate one.
.TP
.B -T --text 
Text mode, ignore images. The default is to include the images.
.TP
.B -u --underline 
Underline text that constitutes a hypertext link. The default
is to not underline.
.TP
.B -U --colour 
Produce colour output for text and background, when specified.
The default is black text on white background (mnemonic: coloUr ;-).
.TP
.B -v --version 
Print information about the current version of html2ps.
.TP
.B \-W \fIstring\fP  --web \fIstring\fP
Process a web of documents by recursively retrieve and convert
documents that are referenced with hyperlinks. When dealing with remote
documents it will of course be necessary to impose restrictions, to
avoid downloading the entire web... The value should be a string
consisting of one of the letters 'a', 'b', 'l', 'r', or 's', optionally
combined with a combination of the letters 'p', 'L', and a positive
integer:
.LP
.RS
.PD 0
.TP
.B a
Follow all links.
.TP
.B b
Follow only links to within the same directory, or below, as the
start document.
.TP
.B l
Follow only links specified with
"<LINK rel=NEXT>" in the document.
.TP
.B p
Prompt for each remote document. This mode will automatically be
entered after the first 50 documents.
.TP
.B r
Follow only relative links.
.TP
.B s
Follow only links to within the same server as the start document.
.TP
.B L
With this option, the order in which the documents are processed will
be: first all top level documents, then the documents linked to from
these etc. For example, if the document A has links to B and C, and
B has a link to D, the order will be A-B-C-D.
By default, each document will be followed by the first document
it links to etc; so the default order for the example is
A-B-D-C.
.TP
.B #
A positive integer giving the number of recursive levels. The
default is 4 (when the option is present).
.RE
.PD
.PP
.TP
.B \-x \fInum\fP  --duplex \fInum\fP
Generate postscript code for single or double sided printing.
No default, valid values are:
.LP
.RS
.PD 0
.TP
.B 0
Single sided.
.TP
.B 1
Double sided.
.TP
.B 2
Double sided, opposite page reversed (tumble mode).
.RE
.PD
.PP
.SH BUGS
.PP
(This is incomplete.)
.PP
The CELLSPACING attribute of the TABLE element is not implemented
as described in the specification; instead the value of the CELLPADDING
attribute is increased by half the value of CELLSPACING.
.PP
Rendering HTML tables well is a non-trivial task. For "real" tables,
that is representation of tabular data, html2ps usually generates
reasonably good output. When tables are used for layout purposes,
the result varies from good to useless. This is because a table cell
is never broken across pages. So if a table contains a cell with a
lot of content, the entire table may have to be scaled down in size
in order to make this cell fit on a single page. Sometimes this may
even result in unreadable output.
.PP
Page breaks are occasionally done in bad places: for example directly
after a (long) heading, and before the last line in a paragraph.
.SH ENVIRONMENT
.TP
HTML2PSPATH
This variable specifies the directories to search for
configuration files. It should be a colon separated list of directory
names. Use a dot '.' to denote the current directory. An empty directory
name (as in ':dir', 'dir1::dir3', or 'dir:') will expand to the directory
where the global configuration file is. The default value is '.:', that
is: search the current directory first, and then the global one.

.SH FILES
.TP
$HOME/.html2psrc
User configuration file, see html2psrc(5).
.SH SEE ALSO
html2psrc(5), perl(1), setlocale(3), strftime(3), weblint(1)
.SH VERSION
This manpage describes html2ps version 1.0 beta7.
.SH AVAILABILITY
http://user.it.uu.se/~jan/html2ps.html
.SH AUTHOR
Jan Karrman (jan@it.uu.se)