summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/man/man1/a2ping.1
blob: 810ff9059120217fc15ee03fb2d84e9b0d3756a1 (plain)
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
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "A2PING 1"
.TH A2PING 1 "2019-11-28" "a2ping" "Peter Szabo"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.ds pts-dev \*[.T]
.do if '\*[.T]'ascii'  .ds pts-dev tty
.do if '\*[.T]'ascii8' .ds pts-dev tty
.do if '\*[.T]'latin1' .ds pts-dev tty
.do if '\*[.T]'nippon' .ds pts-dev tty
.do if '\*[.T]'utf8'   .ds pts-dev tty
.do if '\*[.T]'cp1047' .ds pts-dev tty
.do if '\*[pts-dev]'tty' \{\
.ll 79
.pl 33333v
.nr IN 2n
.\}
.ad n
.SH "NAME"
a2ping.pl \-\- convert between PS, EPS and PDF and other page description
formats
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
 \fBa2ping.pl\fR [\fB\-\-\fR]\fBhelp\fR
 \fBa2ping.pl\fR [\fB\-\-\fR]\fBdoc\fR
 \fBa2ping.pl\fR [\fIoptions\fR] <\fIinputfile\fR> [[\fIoutformat\fR:] \fIoutputfile\fR]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBa2ping\fR is a \s-1UNIX\s0 command line utility written in Perl that
converts many raster image and vector graphics formats to \s-1EPS\s0 or \s-1PDF\s0 and
other page description formats. Accepted input file formats are: \s-1PS\s0
(PostScript), \s-1EPS, PDF, PNG, JPEG, TIFF, PNM, BMP, GIF, LBM, XPM, PCX,
TGA.\s0 Accepted output formats are: \s-1EPS, PCL5, PDF, PDF1, PBM, PGM, PPM,
PS,\s0 markedEPS, markedPS, \s-1PNG, XWD, BMP, TIFF, JPEG, GIF, XPM.\s0
\&\fBa2ping\fR delegates the low-level work to
Ghostscript (\s-1GS\s0), \fBpdftops\fR and \fBsam2p\fR. \fBa2ping\fR fixes many glitches
during the \s-1EPS\s0 to \s-1EPS\s0 conversion, so its output is often more compatible
and better embeddable than its input.
.PP
Without the \f(CW\*(C`\-\-below\*(C'\fR option, it is guarenteed to start at the 0,0
coordinate. \f(CW\*(C`\-\-below\*(C'\fR, \f(CW\*(C`\-\-hires\*(C'\fR and \f(CW\*(C`\-v\*(C'\fR are recommended options.
.PP
The page size is set exactly corresponding to the BoundingBox.
This means that when Ghostscript renders it, the result needs no
cropping, and the \s-1PDF\s0 MediaBox is correct.
.PP
If the bounding box is not right, of course, you have problems. If you
feed crap in, you get crap. But you can supply the
\&\fB\-\-bboxfrom=compute\-gs\fR option to make \s-1GS\s0 recompute the bounding box.
.PP
The name of the input file doesn't matter \*(-- \fBa2ping\fR detects the file
format based on the first few bytes of the file. The name of the output
file matters if \fIoutformat\fR is missing from the command line: then the
extension of the output file determines the FileFormat (\fIoutformat\fR).
.SH "EXTERNAL PROGRAMS"
.IX Header "EXTERNAL PROGRAMS"
The internal file format of \fBa2ping.pl\fR is \s-1PS/EPS.\s0 Everything read is
first converted to \s-1PS\s0 or \s-1EPS,\s0 then processed by \fBa2ping.pl\fR, then
converted to the output format.
.PP
To analyse the bounding box and other properties of non-EPS \s-1PS\s0 files
(and \s-1EPS\s0 files with option \fB\-\-bboxfrom\fR other than \fB=guess\fR), \s-1GS\s0 is
used. Converting \s-1PS\s0 to \s-1EPS\s0 involves this analysis.
.PP
To write \s-1PDF\s0 files, \s-1GS\s0 is used.
.PP
To read \s-1PDF\s0 files, \fBpdftops\fR from the \fBxpdf\fR package is used.
.PP
Sampled input formats are \s-1PNG, JPEG, TIFF, PNM, BMP, GIF, LBM, XPM, PCX\s0
and \s-1TGA.\s0 To read sampled input formats, \fBsam2p\fR is used. \fBsam2p\fR is
a raster image converter written in \*(C+ by the author of \fBa2ping.pl\fR.
.PP
Extra output formats are \s-1PNG, XWD, BMP, TIFF, JPEG, GIF\s0 and \s-1XPM.\s0 To
write extra output formats, \fBsam2p\fR and \s-1GS\s0 are used.
.PP
\&\s-1PNM\s0 output formats are \s-1PGM, PGM\s0 and \s-1PPM.\s0 To write \s-1PNM\s0 output formats, \s-1GS\s0
is used.
.SH "OPTIONS"
.IX Header "OPTIONS"
.SS "General Options"
.IX Subsection "General Options"
.IP "\fB\-h\fR, \fB\-\-help\fR" 2
.IX Item "-h, --help"
Show a summary of the usage
.IP "\fB\-\-doc\fR" 2
.IX Item "--doc"
Show the man page
.IP "\fB\-v\fR, \fB\-\-(no)verbose\fR" 2
.IX Item "-v, --(no)verbose"
Show progress and debug messages (default: no)
.SS "Options for the Bounding box"
.IX Subsection "Options for the Bounding box"
.IP "\fB\-\-(no)hires\fR" 2
.IX Item "--(no)hires"
Use HiResBoundingBox in the input file, if present (default: yes)
.IP "\fB\-\-(no)exact\fR" 2
.IX Item "--(no)exact"
Use ExactBoundingBox in the input file, if present (default: no)
.IP "\fB\-\-(no)keepoldmediabox\fR" 2
.IX Item "--(no)keepoldmediabox"
keep only old, [0 0]\-based MediaBox in \s-1PDF\s0 (default: no)
.IP "\fB\-\-bboxfrom=\fR\fIadsc|compute\-gs|guess|pagesize\fR" 2
.IX Item "--bboxfrom=adsc|compute-gs|guess|pagesize"
Method for determining the BoundingBox  (default: guess)
.IP "\fB\-\-(no)below\fR" 2
.IX Item "--(no)below"
Allow page content below and left of the origin (default: no)
.SS "Options for graphics and fonts"
.IX Subsection "Options for graphics and fonts"
.IP "\fB\-\-(no)compress\fR" 2
.IX Item "--(no)compress"
use compression                   (default: best)
.IP "\fB\-\-(no)antialias\fR" 2
.IX Item "--(no)antialias"
render shades at outlines.  Possible values: (=\fIscale3yes\fR =\fIno\fR =\fIyes\fR)  (default: scale3no)
.IP "\fB\-\-(no)lossy\fR" 2
.IX Item "--(no)lossy"
allow lossy image filters (\s-1EPS\-\s0>\s-1PDF\s0) (default: yes)
.IP "\fB\-\-papersize=\fR\fIunchanged|force\-unknown|600bpx5cm\fR" 2
.IX Item "--papersize=unchanged|force-unknown|600bpx5cm"
(default: default) (bp)
.IP "\fB\-\-threshold=\fR" 2
.IX Item "--threshold="
min color for 1 in 8\->1 bit conv  (default: 128)
.SS "Options for debugging and changing internals"
.IX Subsection "Options for debugging and changing internals"
.IP "\fB\-\-(no)tmpunlink\fR" 2
.IX Item "--(no)tmpunlink"
Unlink temporary files (default: yes).  Use \fB\-\-notmpunklink\fR if you
want to inspect intermediate files.
.IP "\fB\-\-gs\-cmd=\fR\fIpath\fR" 2
.IX Item "--gs-cmd=path"
path to Ghostscript program (default: gs or gswin32c)
.IP "\fB\-\-gs\-ccmd=\fR\fIpath\fR" 2
.IX Item "--gs-ccmd=path"
path to Ghostscript for BoundingBox calculation (default: gs or gswin32c)
.IP "\fB\-\-gsextra=\fR\fI\s-1GS_ARGS\s0\fR" 2
.IX Item "--gsextra=GS_ARGS"
Pass extra arguments to gs
.IP "\fB\-\-extra=\fR" 2
.IX Item "--extra="
Pass extra arguments to external program (i.e pdftops)
.SH "TIPS AND TRICKS"
.IX Header "TIPS AND TRICKS"
.IP "\(bu" 2
If your \s-1EPS\s0 contains a wrong bounding box, you can fix it by running
\&\f(CW\*(C`a2ping.pl \-v \-\-bboxfrom=compute\-gs thefile.eps \-\-\*(C'\fR
.IP "\(bu" 2
You can specify \fB\-\fR as \fIinputfile\fR to get stdin and as \fIoutputfile\fR
to get stdout. This works even for \s-1PDF\s0 files (which must be seekable),
because \fBa2ping\fR copies them to a temporary file automatically.
.IP "\(bu" 2
If \fIinputfile\fR and \fIoutputfile\fR are the same, \fBa2ping\fR copies the
\&\fIinputfile\fR to a temporary location first. However, this usage is
recommended only if there is a backup of the file to be restored in case
\&\fBa2ping\fR doesn't produce the desired result.
.IP "\(bu" 2
If you specify \fB\-\-\fR as \fIoutputfile\fR, it will be the same as \fIinputfile\fR.
.IP "\(bu" 2
\&\fBa2ping\fR respects \fB\-\-Duplex\fR for FileFormat \s-1PCL5,\s0 even though \s-1GS\s0 doesn't.
.IP "\(bu" 2
If you have an incompatible \s-1PS\s0 that \s-1GS\s0 can read but your printer cannot print,
just run \f(CW\*(C`a2ping.pl foo.ps PDF: \- | a2ping.pl \- PS: foo.ps\*(C'\fR
.IP "\(bu" 2
If you have a \s-1PS\s0 coming from Win32 (often with extension \f(CW\*(C`.prn\*(C'\fR), run
it through \fBa2ping\fR. It will remove the resolution changes and the
progress text printed to the terminal (which confuses \fBgv\fR\|(1) and makes
some filters in the print queue emit incorrect output).
.IP "\(bu" 2
\&\fBa2ping\fR does antialiasing (\fB\-\-antialias=scale3no\fR) of glyphs and
curves when emitting a sampled image (FileFormats such as \s-1PGM\s0 and \s-1PPM\s0).
This improves readability of the glyphs. \fB=yes\fR instructs \s-1GS\s0 to do
internal antialiasing, but it usually doesn't improve much. \fB=scale3no\fR
turns off \s-1GS\s0 internal antialiasing, but makes it render everything 3x3
as big, and then scales it back down. \fB=scale3no\fR turns on both 3x3
scaling and \s-1GS\s0 internal antialiasing, which results in thicker lines and
worse quality in general.
.IP "\(bu" 2
When creating a \s-1PBM\s0 file, antialiasing usually doesn't improve the
quality, so it is switched off by default. But if you set
\&\fB\-\-antialias=scale3no\fR or \fB\-\-antialias=scale3yes\fR, \s-1GS\s0 will render a \s-1PGM\s0 file,
and the value of \fB\-\-threshold\fR determines the minimum intensity for white in
the final \s-1PBM.\s0
.IP "\(bu" 2
If you need a bigger sampled output file, specify a larger
\&\fB\-\-Resolution\fR. The default is \fB\-\-Resolution=72\fR. If your sampled output file
is going to be really big, you should specify \fB\-\-AntiAlias=yes\fR instead of
the default \fB\-\-AntiAlias=scale3no\fR to speed up conversion.
.IP "\(bu" 2
To make sure fonts are included in a \s-1PDF\s0 file generated from eps, use
\&\fB\-\-gsextra='\-dEmbedAllFonts=true \-dPDFSETTINGS=/printer'\fR.
.SH "MISC"
.IX Header "MISC"
.IP "\(bu" 2
Doesn't depend on the filename or extension of the input file.
.IP "\(bu" 2
Conversion from \s-1EPS\s0 to \s-1PDF:\s0 fixes glitches etc., calls gs
\&\-sDEVICE=pdfwrite
.IP "\(bu" 2
Conversion from \s-1EPS\s0 to \s-1EPS:\s0 fixes various glitches, moves (llx,lly) to
(0,0), removes binary junk from the beginning of the \s-1EPS\s0 etc.
.IP "\(bu" 2
Conversion from \s-1PDF\s0 to \s-1PDF:\s0 keeps the file intact
.IP "\(bu" 2
Conversion from \s-1PDF\s0 to \s-1EPS:\s0 calls pdftops \-eps (of the xpdf package)
.IP "\(bu" 2
Conversion from \s-1PS\s0 to \s-1EPS:\s0 keeps 1st page only, removes setpagedevice etc.
.SH "AUTHORS"
.IX Header "AUTHORS"
The author of \fBa2ping\fR is Pe\*'ter Szabo\*' <\fIpts@fazekas.hu\fR>.
.PP
\&\fBa2ping\fR is inspired by and historically based on the \fBepstopdf\fR Perl
script modified by Thomas Esser, Sept. 1998, but his modifications have
been removed from \fBa2ping\fR, and also \fBa2ping\fR and \fBepstopdf\fR do not
share common code anymore.  \fBepstopdf\fR is written by Sebastian Rahtz,
for Elsevier Science. \fBepstopdf\fR contained extra tricks from Hans Hagen's
texutil.
.PP
\&\fBa2ping\fR contains contributions from several people, see the file
\&\fI\s-1HISTORY\s0.txt\fR for details. Thank you all for contributing!