| 1 |
.\" Copyright 1996-2025 Glyph & Cog, LLC |
| 2 |
.TH pdftops 1 "14 Nov 2025" |
| 3 |
.SH NAME |
| 4 |
pdftops \- Portable Document Format (PDF) to PostScript converter |
| 5 |
(version 4.06) |
| 6 |
.SH SYNOPSIS |
| 7 |
.B pdftops |
| 8 |
[options] |
| 9 |
.RI [ PDF-file |
| 10 |
.RI [ PS-file ]] |
| 11 |
.SH DESCRIPTION |
| 12 |
.B Pdftops |
| 13 |
converts Portable Document Format (PDF) files to PostScript so they |
| 14 |
can be printed. |
| 15 |
.PP |
| 16 |
Pdftops reads the PDF file, |
| 17 |
.IR PDF-file , |
| 18 |
and writes a PostScript file, |
| 19 |
.IR PS-file . |
| 20 |
If |
| 21 |
.I PS-file |
| 22 |
is not specified, pdftops converts |
| 23 |
.I file.pdf |
| 24 |
to |
| 25 |
.I file.ps |
| 26 |
(or |
| 27 |
.I file.eps |
| 28 |
with the \-eps option). If |
| 29 |
.I PS-file |
| 30 |
is \'-', the PostScript is sent to stdout. |
| 31 |
.SH CONFIGURATION FILE |
| 32 |
Pdftops reads a configuration file at startup. It first tries to find |
| 33 |
the user's private config file, ~/.xpdfrc. If that doesn't exist, it |
| 34 |
looks for a system-wide config file, typically /etc/xpdfrc (but this |
| 35 |
location can be changed when pdftops is built). See the |
| 36 |
.BR xpdfrc (5) |
| 37 |
man page for details. |
| 38 |
.SH OPTIONS |
| 39 |
Many of the following options can be set with configuration file |
| 40 |
commands. These are listed in square brackets with the description of |
| 41 |
the corresponding command line option. |
| 42 |
.TP |
| 43 |
.BI \-f " number" |
| 44 |
Specifies the first page to print. |
| 45 |
.TP |
| 46 |
.BI \-l " number" |
| 47 |
Specifies the last page to print. |
| 48 |
.TP |
| 49 |
.B \-level1 |
| 50 |
Generate Level 1 PostScript. The resulting PostScript files will be |
| 51 |
significantly larger (if they contain images), but will print on Level |
| 52 |
1 printers. This also converts all images to black and white. No |
| 53 |
more than one of the PostScript level options (\-level1, \-level1sep, |
| 54 |
\-level2, \-level2sep, \-level3, \-level3sep) may be given. |
| 55 |
.RB "[config file: " psLevel ] |
| 56 |
.TP |
| 57 |
.B \-level1sep |
| 58 |
Generate Level 1 separable PostScript. All colors are converted to |
| 59 |
CMYK. Images are written with separate stream data for the four |
| 60 |
components. |
| 61 |
.RB "[config file: " psLevel ] |
| 62 |
.TP |
| 63 |
.B \-level2 |
| 64 |
Generate Level 2 PostScript. Level 2 supports color images and image |
| 65 |
compression. This is the default setting. |
| 66 |
.RB "[config file: " psLevel ] |
| 67 |
.TP |
| 68 |
.B \-level2gray |
| 69 |
Generate grayscale Level 2 PostScript. All colors, including images, |
| 70 |
are converted to grayscale. |
| 71 |
.RB "[config file: " psLevel ] |
| 72 |
.TP |
| 73 |
.B \-level2sep |
| 74 |
Generate Level 2 separable PostScript. All colors are converted to |
| 75 |
CMYK. The PostScript separation convention operators are used to |
| 76 |
handle custom (spot) colors. |
| 77 |
.RB "[config file: " psLevel ] |
| 78 |
.TP |
| 79 |
.B \-level3 |
| 80 |
Generate Level 3 PostScript. This enables all Level 2 features plus |
| 81 |
CID font embedding and masked image generation. |
| 82 |
.RB "[config file: " psLevel ] |
| 83 |
.TP |
| 84 |
.B \-level3gray |
| 85 |
Generate grayscale Level 3 PostScript. All colors, including images, |
| 86 |
are converted to grayscale. |
| 87 |
.RB "[config file: " psLevel ] |
| 88 |
.TP |
| 89 |
.B \-level3sep |
| 90 |
Generate Level 3 separable PostScript. The separation handling is the |
| 91 |
same as for \-level2sep. |
| 92 |
.RB "[config file: " psLevel ] |
| 93 |
.TP |
| 94 |
.B \-eps |
| 95 |
Generate an Encapsulated PostScript (EPS) file. An EPS file contains |
| 96 |
a single image, so if you use this option with a multi-page PDF file, |
| 97 |
you must use \-f and \-l to specify a single page. No more than one of |
| 98 |
the mode options (\-eps, \-form) may be given. |
| 99 |
.TP |
| 100 |
.B \-form |
| 101 |
Generate a PostScript form which can be imported by software that |
| 102 |
understands forms. A form contains a single page, so if you use this |
| 103 |
option with a multi-page PDF file, you must use \-f and \-l to specify a |
| 104 |
single page. The \-level1 option cannot be used with \-form. |
| 105 |
.TP |
| 106 |
.B \-opi |
| 107 |
Generate OPI comments for all images and forms which have OPI |
| 108 |
information. (This option is only available if pdftops was compiled |
| 109 |
with OPI support.) |
| 110 |
.RB "[config file: " psOPI ] |
| 111 |
.TP |
| 112 |
.B \-noembt1 |
| 113 |
By default, any Type 1 fonts which are embedded in the PDF file are |
| 114 |
copied into the PostScript file. This option causes pdftops to |
| 115 |
substitute base fonts instead. Embedded fonts make PostScript files |
| 116 |
larger, but may be necessary for readable output. |
| 117 |
.RB "[config file: " psEmbedType1Fonts ] |
| 118 |
.TP |
| 119 |
.B \-noembtt |
| 120 |
By default, any TrueType fonts which are embedded in the PDF file are |
| 121 |
copied into the PostScript file. This option causes pdftops to |
| 122 |
substitute base fonts instead. Embedded fonts make PostScript files |
| 123 |
larger, but may be necessary for readable output. Also, some |
| 124 |
PostScript interpreters do not have TrueType rasterizers. |
| 125 |
.RB "[config file: " psEmbedTrueTypeFonts ] |
| 126 |
.TP |
| 127 |
.B \-noembcidps |
| 128 |
By default, any CID PostScript fonts which are embedded in the PDF |
| 129 |
file are copied into the PostScript file. This option disables that |
| 130 |
embedding. No attempt is made to substitute for non-embedded CID |
| 131 |
PostScript fonts. |
| 132 |
.RB "[config file: " psEmbedCIDPostScriptFonts ] |
| 133 |
.TP |
| 134 |
.B \-noembcidtt |
| 135 |
By default, any CID TrueType fonts which are embedded in the PDF file |
| 136 |
are copied into the PostScript file. This option disables that |
| 137 |
embedding. No attempt is made to substitute for non-embedded CID |
| 138 |
TrueType fonts. |
| 139 |
.RB "[config file: " psEmbedCIDTrueTypeFonts ] |
| 140 |
.TP |
| 141 |
.B \-preload |
| 142 |
Convert PDF forms to PS procedures, and preload image data. This uses |
| 143 |
more memory in the PostScript interpreter, but generates significantly |
| 144 |
smaller PS files in situations where, e.g., the same image is drawn on |
| 145 |
every page of a long document. |
| 146 |
.TP |
| 147 |
.BI \-paper " size" |
| 148 |
Set the paper size to one of "letter", "legal", "A4", or "A3". This |
| 149 |
can also be set to "match", which will set the paper size to match the |
| 150 |
size specified in the PDF file. |
| 151 |
.RB "[config file: " psPaperSize ] |
| 152 |
.TP |
| 153 |
.BI \-paperw " size" |
| 154 |
Set the paper width, in points. |
| 155 |
.RB "[config file: " psPaperSize ] |
| 156 |
.TP |
| 157 |
.BI \-paperh " size" |
| 158 |
Set the paper height, in points. |
| 159 |
.RB "[config file: " psPaperSize ] |
| 160 |
.TP |
| 161 |
.B \-nocrop |
| 162 |
By default, output is cropped to the CropBox specified in the PDF |
| 163 |
file. This option disables cropping. |
| 164 |
.RB "[config file: " psCrop ] |
| 165 |
.TP |
| 166 |
.B \-expand |
| 167 |
Expand PDF pages smaller than the paper to fill the paper. By |
| 168 |
default, these pages are not scaled. |
| 169 |
.RB "[config file: " psExpandSmaller ] |
| 170 |
.TP |
| 171 |
.B \-noshrink |
| 172 |
Don't scale PDF pages which are larger than the paper. By default, |
| 173 |
pages larger than the paper are shrunk to fit. |
| 174 |
.RB "[config file: " psShrinkLarger ] |
| 175 |
.TP |
| 176 |
.B \-nocenter |
| 177 |
By default, PDF pages smaller than the paper (after any scaling) are |
| 178 |
centered on the paper. This option causes them to be aligned to the |
| 179 |
lower-left corner of the paper instead. |
| 180 |
.RB "[config file: " psCenter ] |
| 181 |
.TP |
| 182 |
.B \-pagecrop |
| 183 |
Treat the CropBox as the PDF page size. By default, the MediaBox is |
| 184 |
used as the page size. |
| 185 |
.RB "[config file: " psUseCropBoxAsPage ] |
| 186 |
.TP |
| 187 |
.B \-userunit |
| 188 |
Honor the UserUnit settings on PDF pages when computing page/paper |
| 189 |
size. By default, pdftops ignores UserUnit. |
| 190 |
.TP |
| 191 |
.B \-duplex |
| 192 |
Set the Duplex pagedevice entry in the PostScript file. This tells |
| 193 |
duplex-capable printers to enable duplexing. |
| 194 |
.RB "[config file: " psDuplex ] |
| 195 |
.TP |
| 196 |
.BI \-opw " password" |
| 197 |
Specify the owner password for the PDF file. Providing this will |
| 198 |
bypass all security restrictions. |
| 199 |
.TP |
| 200 |
.BI \-upw " password" |
| 201 |
Specify the user password for the PDF file. |
| 202 |
.TP |
| 203 |
.B \-verbose |
| 204 |
Print a status message (to stdout) before processing each page. |
| 205 |
.RB "[config file: " printStatusInfo ] |
| 206 |
.TP |
| 207 |
.B \-q |
| 208 |
Don't print any messages or errors. |
| 209 |
.RB "[config file: " errQuiet ] |
| 210 |
.TP |
| 211 |
.BI \-cfg " config-file" |
| 212 |
Read |
| 213 |
.I config-file |
| 214 |
in place of ~/.xpdfrc or the system-wide config file. |
| 215 |
.TP |
| 216 |
.B \-v |
| 217 |
Print copyright and version information. |
| 218 |
.TP |
| 219 |
.B \-h |
| 220 |
Print usage information. |
| 221 |
.RB ( \-help |
| 222 |
and |
| 223 |
.B \-\-help |
| 224 |
are equivalent.) |
| 225 |
.SH EXIT CODES |
| 226 |
The Xpdf tools use the following exit codes: |
| 227 |
.TP |
| 228 |
0 |
| 229 |
No error. |
| 230 |
.TP |
| 231 |
1 |
| 232 |
Error opening a PDF file. |
| 233 |
.TP |
| 234 |
2 |
| 235 |
Error opening an output file. |
| 236 |
.TP |
| 237 |
3 |
| 238 |
Error related to PDF permissions. |
| 239 |
.TP |
| 240 |
98 |
| 241 |
Out of memory. |
| 242 |
.TP |
| 243 |
99 |
| 244 |
Other error. |
| 245 |
.SH AUTHOR |
| 246 |
The pdftops software and documentation are copyright 1996-2025 Glyph & |
| 247 |
Cog, LLC. |
| 248 |
.SH "SEE ALSO" |
| 249 |
.BR xpdf (1), |
| 250 |
.BR pdftotext (1), |
| 251 |
.BR pdftohtml (1), |
| 252 |
.BR pdfinfo (1), |
| 253 |
.BR pdffonts (1), |
| 254 |
.BR pdfdetach (1), |
| 255 |
.BR pdftoppm (1), |
| 256 |
.BR pdftopng (1), |
| 257 |
.BR pdfimages (1), |
| 258 |
.BR xpdfrc (5) |
| 259 |
.br |
| 260 |
.B http://www.xpdfreader.com/ |