1EPSTOPDF(1) General Commands Manual EPSTOPDF(1)
2
3
4
6 epstopdf, repstopdf - convert an EPS file to PDF
7
9 epstopdf [options] [epsfile [pdffile.pdf]]
10
12 By default, epstopdf converts the input PostScript file to PDF, using
13 Ghostscript.
14
15 Epstopdf transforms the Encapsulated PostScript file epsfile (or stan‐
16 dard input) so that it is guaranteed to start at the 0,0 coordinate,
17 and it sets a page size exactly corresponding to the BoundingBox.
18 Thus, the result needs no cropping, and the PDF MediaBox is correct.
19
20 By default, the output name is the input name with any extension re‐
21 placed by .pdf. An output name ending with .pdf can also be given as a
22 second argument on the command line, or the --outfile (-o) option can
23 be used with any name.
24
25 The output is PDF 1.5 by default; use, e.g.,
26 --gsopt=-dCompatibilityLevel=1.7
27 to change this. (Until epstopdf 2.28 (released September 2018), the PDF
28 version was whatever the underlying Ghostscript or other interpreter
29 produced by default.)
30
31 PJL commands at the start of a file are removed. DOS EPS binary files
32 (TN 5002) are supported.
33
34 If the bounding box in the input is incorrect, of course there will be
35 resulting problems.
36
38 Options may start with either "-" or "--", and may be unambiguously ab‐
39 breviated. It is best to use the full option name in scripts to avoid
40 possible collisions with new options in the future.
41
42 General script options:
43
44 --help display help message and exit
45
46 --version
47 display version information and exit
48
49 --outfile=file
50 write result to file. If this option is not given, and --nogs
51 or --filter is specified, write to standard output; otherwise,
52 the default is to construct the output file name by replacing
53 any extension in the input file with `.pdf'.
54
55 --[no]debug
56 write debugging info (default: false).
57
58 --[no]exact
59 scan ExactBoundingBox (default: false).
60
61 --[no]filter
62 read standard input and (unless --outfile is given) write stan‐
63 dard output (default: false).
64
65 --[no]gs
66 run Ghostscript (default: true). With --nogs, output (to stan‐
67 dard output by default) the PostScript that would normally be
68 converted; that is, the input PostScript as modified by epsto‐
69 pdf.
70
71 --[no]hires
72 scan HiresBoundingBox (default: false).
73
74 --restricted=val
75 turn on restricted mode (default: [true for repstopdf, else
76 false]); this forbids the use of --gscmd and other options and
77 imposes restrictions on the input and output file names accord‐
78 ing to the values of openin_any and openout_any (see the Web2c
79 manual, https://tug.org/web2c). On Windows, the Ghostscript
80 command is forced to be the TeX Live builtin gs, installed under
81 .../tlpkg/tlgs/bin/.
82
83 Options for Ghostscript (more info below):
84
85 --gscmd=val
86 pipe output to val (default: [gswin64c on 64-bit Windows,
87 gswin32c on 32-bit Windows, else gs])
88
89 --gsopt=val
90 include val as one argument in the gs command (can be repeated).
91
92 --gsopts=val
93 split val at whitespace and include each resulting word as an
94 argument in the gs command (can be repeated).
95
96 --autorotate=val
97 set AutoRotatePages (default: None); recognized val choices:
98 None, All, PageByPage. For EPS files, PageByPage is equivalent
99 to All.
100
101 --[no]compress
102 use compression in the output (default: true); if turned off,
103 passes -dUseFlateCompression=false.
104
105 --device=dev
106 use -sDEVICE=dev (default: pdfwrite); not allowed in restricted
107 mode.
108
109 --[no]embed
110 embed fonts (default: true); passes -dMaxSubsetPct=100 -dSubset‐
111 Fonts=true -dEmbedAllFonts=true.
112
113 --[no]gray
114 grayscale output (default: false); passes -sColorConversion‐
115 Strategy=Gray -dProcessColorModel=/DeviceGray.
116
117 --pdfsettings=val
118 use -dPDFSETTINGS=/val (default is `prepress' if --embed, else
119 empty); recognized val choices: screen, ebook, printer, pre‐
120 press, default.
121
122 --[no]quiet
123 use -q, a.k.a. -dQUIET (default: false).
124
125 --res=dpi, dpixdpi
126 set image resolution (default: [use gs default]); ignored if
127 --debug is set.
128
129 --[no]safer
130 use -d(NO)QUIET (default: true).
131
132 In addition to the specific options above, additional options to be
133 used with gs can be specified with either or both of the two cumulative
134 options --gsopts and --gsopt.
135
136 --gsopts takes a single string of options, which is split at white‐
137 space, each resulting word then added to the gs command line individu‐
138 ally.
139
140 --gsopt adds its argument as a single option to the gs command line.
141 It can be used multiple times to specify options separately, and is
142 necessary if an option or its value contains whitespace.
143
144 In restricted mode, options are limited to those with names and values
145 known to be safe. Some options taking booleans, integers or fixed
146 names are allowed, those taking general strings are not.
147
148
150 These examples all equivalently convert `test.eps' to `test.pdf':
151 epstopdf test.eps
152 epstopdf test.eps test.pdf
153 cat test.eps | epstopdf --filter >test.pdf
154 cat test.eps | epstopdf -f -o=test.pdf
155
156 Example for using HiResBoundingBox instead of BoundingBox:
157 epstopdf --hires test.eps
158
159 Example for epstopdf's attempt at correcting PostScript:
160 $program --nogs test.ps >testcorr.ps
161
162 In all cases, you can add --debug (-d) to see more about what epstopdf
163 is doing.
164
166 The case of "%%BoundingBox: (atend)" when input is not seekable (e.g.,
167 from a pipe) is not supported.
168
169 Report bugs in the program or this man page to tex-k@tug.org. When re‐
170 porting bugs, please include an input file and the command line options
171 specified, so the problem can be reproduced.
172
174 gs(1), pdfcrop(1).
175
176 The epstopdf LaTeX package, which automates running this script on the
177 fly under TeX: https://ctan.org/pkg/epstopdf-pkg.
178
180 Originally written by Sebastian Rahtz, for Elsevier Science, with sub‐
181 sequent contributions from Thomas Esser, Gerben Wierda, Heiko Oberdiek,
182 and many others. Currently maintained by Karl Berry.
183
184 Man page originally written by Jim Van Zandt.
185
186 epstopdf home page: https://tug.org/epstopdf.
187
188 You may freely use, modify and/or distribute this man page.
189
190
191
192 29 August 2022 EPSTOPDF(1)