1A2PING(1)                         Peter Szabo                        A2PING(1)
2
3
4

NAME

6  a2ping.pl  --  convert  between  PS,  EPS  and PDF and other page description
7  formats
8

SYNOPSIS

10   a2ping.pl [--]help
11   a2ping.pl [--]doc
12   a2ping.pl [options] <inputfile> [[outformat:] outputfile]
13

DESCRIPTION

15  a2ping is a UNIX command line utility written  in  Perl  that  converts  many
16  raster  image  and  vector  graphics  formats  to  EPS  or PDF and other page
17  description formats. Accepted input file formats are: PS  (PostScript),  EPS,
18  PDF,  PNG,  JPEG,  TIFF,  PNM,  BMP, GIF, LBM, XPM, PCX, TGA. Accepted output
19  formats are: EPS, PCL5, PDF, PDF1, PBM, PGM, PPM,  PS,  markedEPS,  markedPS,
20  PNG,  XWD, BMP, TIFF, JPEG, GIF, XPM.  a2ping delegates the low-level work to
21  Ghostscript (GS), pdftops and sam2p. a2ping fixes many  glitches  during  the
22  EPS  to  EPS  conversion,  so  its output is often more compatible and better
23  embeddable than its input.
24
25  Without  the  "--below"  option,  it  is  guarenteed  to  start  at  the  0,0
26  coordinate. "--below", "--hires" and "-v" are recommended options.
27
28  The  page  size  is set exactly corresponding to the BoundingBox.  This means
29  that when Ghostscript renders it, the result needs no cropping, and  the  PDF
30  MediaBox is correct.
31
32  If  the  bounding box is not right, of course, you have problems. If you feed
33  crap in, you get crap. But you can supply the --bboxfrom=compute-gs option to
34  make GS recompute the bounding box.
35
36  The  name  of the input file doesn't matter -- a2ping detects the file format
37  based on the first few bytes of the file. The name of the output file matters
38  if  outformat  is  missing  from  the command line: then the extension of the
39  output file determines the FileFormat (outformat).
40

EXTERNAL PROGRAMS

42  The internal file format of a2ping.pl is PS/EPS.  Everything  read  is  first
43  converted  to  PS  or EPS, then processed by a2ping.pl, then converted to the
44  output format.
45
46  To analyse the bounding box and other properties of non-EPS PS files (and EPS
47  files with option --bboxfrom other than =guess), GS is used. Converting PS to
48  EPS involves this analysis.
49
50  To write PDF files, GS is used.
51
52  To read PDF files, pdftops from the xpdf package is used.
53
54  Sampled input formats are PNG, JPEG, TIFF, PNM, BMP, GIF, LBM, XPM,  PCX  and
55  TGA.  To  read  sampled input formats, sam2p is used. sam2p is a raster image
56  converter written in C++ by the author of a2ping.pl.
57
58  Extra output formats are PNG, XWD, BMP, TIFF, JPEG, GIF  and  XPM.  To  write
59  extra output formats, sam2p and GS are used.
60
61  PNM  output  formats are PGM, PGM and PPM. To write PNM output formats, GS is
62  used.
63

OPTIONS

65   General Options
66  -h, --help
67    Show a summary of the usage
68
69  --doc
70    Show the man page
71
72  -v, --(no)verbose
73    Show progress and debug messages (default: no)
74
75   Options for the Bounding box
76  --(no)hires
77    Use HiResBoundingBox in the input file, if present (default: yes)
78
79  --(no)exact
80    Use ExactBoundingBox in the input file, if present (default: no)
81
82  --(no)keepoldmediabox
83    keep only old, [0 0]-based MediaBox in PDF (default: no)
84
85  --bboxfrom=adsc|compute-gs|guess|pagesize
86    Method for determining the BoundingBox  (default: guess)
87
88  --(no)below
89    Allow page content below and left of the origin (default: no)
90
91   Options for graphics and fonts
92  --(no)compress
93    use compression                   (default: best)
94
95  --(no)antialias
96    render  shades  at  outlines.   Possible  values:  (=scale3yes  =no   =yes)
97    (default: scale3no)
98
99  --(no)lossy
100    allow lossy image filters (EPS->PDF) (default: yes)
101
102  --papersize=unchanged|force-unknown|600bpx5cm
103    (default: default) (bp)
104
105  --threshold=
106    min color for 1 in 8->1 bit conv  (default: 128)
107
108   Options for debugging and changing internals
109  --(no)tmpunlink
110    Unlink  temporary  files (default: yes).  Use --notmpunklink if you want to
111    inspect intermediate files.
112
113  --gs-cmd=path
114    path to Ghostscript program (default: gs or gswin32c)
115
116  --gs-ccmd=path
117    path to Ghostscript for BoundingBox calculation (default: gs or gswin32c)
118
119  --gsextra=GS_ARGS
120    Pass extra arguments to gs
121
122  --extra=
123    Pass extra arguments to external program (i.e pdftops)
124

TIPS AND TRICKS

126  · If your EPS contains a wrong bounding  box,  you  can  fix  it  by  running
127    "a2ping.pl -v --bboxfrom=compute-gs thefile.eps --"
128
129  · You  can  specify  -  as  inputfile  to  get stdin and as outputfile to get
130    stdout. This works even for PDF files (which  must  be  seekable),  because
131    a2ping copies them to a temporary file automatically.
132
133  · If  inputfile and outputfile are the same, a2ping copies the inputfile to a
134    temporary location first. However, this usage is recommended only if  there
135    is  a  backup of the file to be restored in case a2ping doesn't produce the
136    desired result.
137
138  · If you specify -- as outputfile, it will be the same as inputfile.
139
140  · a2ping respects --Duplex for FileFormat PCL5, even though GS doesn't.
141
142  · If you have an incompatible PS that GS can read  but  your  printer  cannot
143    print, just run "a2ping.pl foo.ps PDF: - | a2ping.pl - PS: foo.ps"
144
145  · If  you  have  a PS coming from Win32 (often with extension ".prn"), run it
146    through a2ping. It will remove the resolution changes and the progress text
147    printed to the terminal (which confuses gv(1) and makes some filters in the
148    print queue emit incorrect output).
149
150  · a2ping does antialiasing (--antialias=scale3no) of glyphs and  curves  when
151    emitting  a sampled image (FileFormats such as PGM and PPM).  This improves
152    readability of the glyphs. =yes instructs GS to do  internal  antialiasing,
153    but  it  usually  doesn't  improve  much.  =scale3no  turns off GS internal
154    antialiasing, but makes it render everything 3x3 as big, and then scales it
155    back   down.   =scale3no   turns  on  both  3x3  scaling  and  GS  internal
156    antialiasing, which results in thicker lines and worse quality in general.
157
158  · When creating a PBM file, antialiasing usually doesn't improve the quality,
159    so  it  is  switched off by default. But if you set --antialias=scale3no or
160    --antialias=scale3yes, GS  will  render  a  PGM  file,  and  the  value  of
161    --threshold determines the minimum intensity for white in the final PBM.
162
163  · If  you  need  a bigger sampled output file, specify a larger --Resolution.
164    The default is --Resolution=72. If your sampled output file is going to  be
165    really  big,  you  should  specify  --AntiAlias=yes  instead of the default
166    --AntiAlias=scale3no to speed up conversion.
167
168  · To make sure fonts are included in a  PDF  file  generated  from  eps,  use
169    --gsextra='-dEmbedAllFonts=true -dPDFSETTINGS=/printer'.
170

MISC

172  · Doesn't depend on the filename or extension of the input file.
173
174  · Conversion from EPS to PDF: fixes glitches etc., calls gs -sDEVICE=pdfwrite
175
176  · Conversion  from  EPS  to  EPS:  fixes various glitches, moves (llx,lly) to
177    (0,0), removes binary junk from the beginning of the EPS etc.
178
179  · Conversion from PDF to PDF: keeps the file intact
180
181  · Conversion from PDF to EPS: calls pdftops -eps (of the xpdf package)
182
183  · Conversion from PS to EPS: keeps 1st page only, removes setpagedevice etc.
184

AUTHORS

186  The author of a2ping is Peter Szabo <pts@fazekas.hu>.
187
188  a2ping is inspired by and historically based  on  the  epstopdf  Perl  script
189  modified by Thomas Esser, Sept. 1998, but his modifications have been removed
190  from a2ping, and also a2ping and epstopdf do not share common  code  anymore.
191  epstopdf  is  written  by  Sebastian  Rahtz,  for  Elsevier Science. epstopdf
192  contained extra tricks from Hans Hagen's texutil.
193
194  a2ping contains contributions from several people, see the  file  HISTORY.txt
195  for details. Thank you all for contributing!
196
197
198
199a2ping                            2018-11-12                         A2PING(1)
Impressum