| 1 |
.TH EPSTOPDF 1 "29 April 2024" |
| 2 |
.\" $Id: epstopdf.1 71121 2024-04-29 17:27:25Z karl $ |
| 3 |
.SH NAME |
| 4 |
epstopdf, repstopdf \- convert an EPS file to PDF |
| 5 |
.SH SYNOPSIS |
| 6 |
\fBepstopdf\fP [\fIoptions\fP] [\fIepsfile\fP [\fIpdffile\fP.pdf]] |
| 7 |
.SH DESCRIPTION |
| 8 |
\fBepstopdf\fP converts the input PostScript file to PDF, by default |
| 9 |
using Ghostscript. |
| 10 |
.PP |
| 11 |
In more detail: \fBepstopdf\fP transforms the Encapsulated PostScript |
| 12 |
file \fIepsfile\fP (or standard input) so that it is guaranteed to start |
| 13 |
at the 0,0 coordinate, and it sets a page size exactly corresponding to |
| 14 |
the BoundingBox. Thus, the result needs no cropping, and the PDF |
| 15 |
MediaBox is correct. |
| 16 |
.PP |
| 17 |
By default, the output name is the input name with any extension |
| 18 |
replaced by \fB.pdf\fP. An output name ending with .pdf can also be given |
| 19 |
as a second argument on the command line, or the \fB--outfile\fP |
| 20 |
(\fB-o\fP) option can be used with any name. |
| 21 |
.PP |
| 22 |
The output is PDF 1.5 by default. To change this, use, for example |
| 23 |
.nf |
| 24 |
--gsopt=-dCompatibilityLevel=1.7 |
| 25 |
.fi |
| 26 |
(Until epstopdf 2.28 (released September 2018), the |
| 27 |
PDF version was whatever the underlying Ghostscript or other interpreter |
| 28 |
produced by default.) |
| 29 |
.PP |
| 30 |
PJL commands at the start of a file are removed. DOS EPS binary files |
| 31 |
(TN 5002) are supported. Seeking from a pipe is not supported. |
| 32 |
.PP |
| 33 |
If the bounding box in the input is incorrect, inevitably there will |
| 34 |
be resulting problems. |
| 35 |
.SH OPTIONS |
| 36 |
Options may start with either "\fB-\fP" or "\fB--\fP", and may be |
| 37 |
unambiguously abbreviated. It is best to use the full option name in |
| 38 |
scripts to avoid possible collisions with new options in the future. |
| 39 |
.PP |
| 40 |
General script options: |
| 41 |
.IP "\fB--help\fP |
| 42 |
display help message and exit |
| 43 |
.IP "\fB--version\fP |
| 44 |
display version information and exit |
| 45 |
.IP "\fB--outfile\fP=\fIfile\fP" |
| 46 |
write result to \fIfile\fP. If this option is not given, and |
| 47 |
\fB--nogs\fP or \fB--filter\fP is specified, write to standard output; |
| 48 |
otherwise, the default is to construct the output file name by replacing |
| 49 |
any extension in the input file with `.pdf'. |
| 50 |
.IP "\fB--\fP[\fBno\fP]\fBdebug\fP" |
| 51 |
write debugging info (default: false). For maximum output, use \fB--debug\fP |
| 52 |
as the first option. |
| 53 |
.IP "\fB--\fP[\fBno\fP]\fBexact\fP" |
| 54 |
scan ExactBoundingBox (default: false). |
| 55 |
.IP "\fB--\fP[\fBno\fP]\fBfilter\fP" |
| 56 |
read standard input and (unless \fB--outfile\fP is given) write standard |
| 57 |
output (default: false). |
| 58 |
.IP "\fB--\fP[\fBno\fP]\fBgs\fP" |
| 59 |
run Ghostscript (default: true). With \fB--nogs\fP, output (to standard |
| 60 |
output by default) the PostScript that would normally be converted; that |
| 61 |
is, the input PostScript as modified by \fBepstopdf\fP. |
| 62 |
.IP "\fB--\fP[\fBno\fP]\fBhires\fP" |
| 63 |
scan HiresBoundingBox (default: false). |
| 64 |
.IP "\fB--restricted\fP=\fIval\fP" |
| 65 |
turn on restricted mode (default: [true for repstopdf, else false]); |
| 66 |
this forbids the use of \fB--gscmd\fP, among other options, and imposes |
| 67 |
restrictions on the input and output file names according to the values |
| 68 |
of openin_any and openout_any (see the Web2c manual, https://tug.org/web2c). |
| 69 |
On Windows, the Ghostscript command is forced to be the TeX Live builtin |
| 70 |
gs, installed under \fB.../tlpkg/tlgs/bin/\fP. |
| 71 |
.PP |
| 72 |
Options for Ghostscript (more info below): |
| 73 |
.IP "\fB--gscmd\fP=\fIval\fP" |
| 74 |
pipe output to \fIval\fP (default: [\fBgswin64c.exe\fP on 64-bit Windows, |
| 75 |
\fBgswin32c.exe\fP on 32-bit Windows, else \fBgs\fP]) |
| 76 |
.IP "\fB--gsopt\fP=\fIval\fP" |
| 77 |
include \fIval\fP as one argument in the gs command (can be repeated). |
| 78 |
.IP "\fB--gsopts\fP=\fIval\fP" |
| 79 |
split \fIval\fP at whitespace and include each resulting word as an |
| 80 |
argument in the gs command (can be repeated). |
| 81 |
.IP "\fB--autorotate\fP=\fIval\fP" |
| 82 |
set AutoRotatePages (default: None); recognized \fIval\fP choices: |
| 83 |
None, All, PageByPage. For EPS files, PageByPage is equivalent to All. |
| 84 |
.IP "\fB--\fP[\fBno\fP]\fBcompress\fP" |
| 85 |
use compression in the output (default: true); if turned off, passes |
| 86 |
.BR -dUseFlateCompression=false . |
| 87 |
.IP "\fB--device\fP=\fIdev\fP" |
| 88 |
use \fB-sDEVICE=\fIdev\fR (default: pdfwrite); not allowed in restricted mode. |
| 89 |
.IP "\fB--\fP[\fBno\fP]\fBembed\fP" |
| 90 |
embed fonts (default: true); passes |
| 91 |
.B -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true. |
| 92 |
.IP "\fB--\fP[\fBno\fP]\fBgray\fP" |
| 93 |
grayscale output (default: false); passes |
| 94 |
.B -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray. |
| 95 |
.IP "\fB--pdfsettings\fP=\fIval\fP" |
| 96 |
use -dPDFSETTINGS=/\fIval\fP (default is `prepress' if \fB--embed\fP, |
| 97 |
else empty); recognized \fIval\fP choices: screen, ebook, printer, |
| 98 |
prepress, default. |
| 99 |
.IP "\fB--\fP[\fBno\fP]\fBquiet\fP" |
| 100 |
use -q, a.k.a. -dQUIET (default: false). |
| 101 |
.IP "\fB--res\fP=\fIdpi, dpi\fPx\fIdpi\fP" |
| 102 |
set image resolution (default: [use gs default]). |
| 103 |
.IP "\fB--\fP[\fBno\fP]\fBsafer\fP" |
| 104 |
use -d(NO)SAFER (default: true). |
| 105 |
.PP |
| 106 |
In addition to the specific options above, additional options to be used |
| 107 |
with gs can be specified with either or both of the two cumulative |
| 108 |
options \fB--gsopts\fP and \fB--gsopt.\fP |
| 109 |
.PP |
| 110 |
\fB--gsopts\fP takes a single string of options, which is split at |
| 111 |
whitespace; each resulting word then added to the gs command line |
| 112 |
individually. |
| 113 |
.PP |
| 114 |
\fB--gsopt\fP adds its argument as a single option to the gs command |
| 115 |
line. It can be used multiple times to specify options separately. |
| 116 |
This form must be used if a gs option or its value contains whitespace. |
| 117 |
.PP |
| 118 |
In restricted mode, options are limited to those with names and values |
| 119 |
known to be safe. Some options taking booleans, integers or fixed |
| 120 |
names are allowed, those taking general strings are not. |
| 121 |
.PP |
| 122 |
In order to give a comprehensible error message, epstopdf checks whether |
| 123 |
kpsewhich and (the specified) gs are found in the current PATH, or |
| 124 |
executable if they are specified as absolute names. |
| 125 |
|
| 126 |
.SH EXAMPLES |
| 127 |
These examples all equivalently convert `test.eps' to `test.pdf': |
| 128 |
.nf |
| 129 |
epstopdf test.eps |
| 130 |
epstopdf test.eps test.pdf |
| 131 |
cat test.eps | epstopdf --filter >test.pdf |
| 132 |
cat test.eps | epstopdf -f -o=test.pdf |
| 133 |
.fi |
| 134 |
.PP |
| 135 |
Example for using HiResBoundingBox instead of BoundingBox: |
| 136 |
.nf |
| 137 |
epstopdf --hires test.eps |
| 138 |
.fi |
| 139 |
.PP |
| 140 |
Example for \fBepstopdf\fP's attempt at correcting PostScript: |
| 141 |
.nf |
| 142 |
epstopdf --nogs test.ps >testcorr.ps |
| 143 |
.fi |
| 144 |
.PP |
| 145 |
In all cases, you can add \fB--debug\fP to see more about |
| 146 |
what \fBepstopdf\fP is doing. Use \fB--debug\fP as the first option for |
| 147 |
maximum output. |
| 148 |
.SH BUGS |
| 149 |
The case of "%%BoundingBox: (atend)" when input is not seekable (e.g., |
| 150 |
from a pipe) is not supported. |
| 151 |
.PP |
| 152 |
Report bugs in the program or this man page to [email protected] |
| 153 |
(https://lists.tug.org/tex-k). When reporting bugs, please include an |
| 154 |
input file and the command line options specified, so the problem can be |
| 155 |
reproduced. |
| 156 |
.SH SEE ALSO |
| 157 |
\fBgs\fP(1), |
| 158 |
\fBpdfcrop\fP(1). |
| 159 |
.PP |
| 160 |
The epstopdf LaTeX package, which automates running this script on the |
| 161 |
fly under LaTeX: https://ctan.org/pkg/epstopdf-pkg. |
| 162 |
.SH AUTHOR |
| 163 |
Originally written by Sebastian Rahtz, for Elsevier Science, with |
| 164 |
subsequent contributions from Thomas Esser, Gerben Wierda, Heiko |
| 165 |
Oberdiek, and many others. Currently maintained by Karl Berry. |
| 166 |
.PP |
| 167 |
Man page originally written by Jim Van Zandt. |
| 168 |
.PP |
| 169 |
epstopdf package page on CTAN: https://ctan.org/pkg/epstopdf. |
| 170 |
.PP |
| 171 |
epstopdf home page: https://tug.org/epstopdf. |
| 172 |
.PP |
| 173 |
You may freely use, modify and/or distribute this man page. |
| 174 |
The epstopdf script is released under the modified BSD license. |
| 175 |
.PP |
| 176 |
$Id: epstopdf.1 71121 2024-04-29 17:27:25Z karl $ |