1pdftocairo(1)               General Commands Manual              pdftocairo(1)
2
3
4

NAME

6       pdftocairo      -     Portable     Document     Format     (PDF)     to
7       PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo
8

SYNOPSIS

10       pdftocairo [options] PDF-file [output-file]
11

DESCRIPTION

13       pdftocairo converts Portable Document Format  (PDF)  files,  using  the
14       cairo output device of the poppler PDF library, to any of the following
15       output formats:
16
17       ·      Portable Network Graphics (PNG)
18
19       ·      JPEG Interchange Format (JPEG)
20
21       ·      Tagged Image File Format (TIFF)
22
23       ·      Portable Document Format (PDF)
24
25       ·      PostScript (PS)
26
27       ·      Encapsulated PostScript (EPS)
28
29       ·      Scalable Vector Graphics (SVG)
30
31       ·      Windows Printer
32
33       pdftocairo reads the PDF file, PDF-file,  and  writes  to  output-file.
34       The image formats (PNG, JPEG, and TIFF) generate one file per page with
35       the page number and file type appended to output-file.   When  -single‐
36       file  is used with the image formats, the file type is appended to out‐
37       put-file.  When the output format is a vector format (PDF, PS, EPS, and
38       SVG), output-file is the full filename.
39
40       If  the  PDF-file  is “-” , the PDF is read from stdin.  If the output-
41       file is “-” , the output file will be written to stdout.  Using  stdout
42       is not valid with image formats unless -singlefile is used.  If output-
43       file is not used, the output filename will be derived from the PDF-file
44       filename.
45
46       Not  all  options are valid with all output formats. One (and only one)
47       of the output format options (-png, -jpeg, -tiff,  -pdf,  -print,  -ps,
48       -eps, or -svg) must be used.
49
50       The  resolution  options (-r, -rx, -ry) set the resolution of the image
51       output formats. The image dimensions will depend on the PDF  page  size
52       and  the  resolution.  For the vector outputs, regions of the page that
53       can not be represented natively in the output format  (eg  translucency
54       in PS) will be rasterized at the resolution specified by the resolution
55       options.
56
57       The -scale-to options may be used to set a fixed image size. The  image
58       resolution will vary with the page size.
59
60       The  cropping options (-x, -y, -W, and -H) use units of pixels with the
61       image formats and PostScript points (1/72 inch) with  the  vector  for‐
62       mats.  When  cropping  is used with vector output the cropped region is
63       centered unless -nocenter is used in which case the cropped  region  is
64       at the top left (SVG) or bottom left (PDF, PS, EPS).
65

OPTIONS

67       -png   Generates a PNG file(s)
68
69       -jpeg  Generates a JPEG file(s). See also -jpegopt.
70
71       -tiff  Generates a TIFF file(s)
72
73       -pdf   Generates a PDF file
74
75       -ps    Generate a PS file
76
77       -eps   Generate an EPS file. An EPS file contains a single image, so if
78              you use this option with a multi-page PDF file, you must use  -f
79              and  -l to specify a single page.  The page size options (-orig‐
80              pagesizes, -paper, -paperw, -paperh) can not be used  with  this
81              option.
82
83       -svg   Generate a SVG (Scalable Vector Graphics) file
84
85       -print (Windows only) Prints to a system printer. See also -printer and
86              -printeropt.
87               If an output file is not specified, the output will be sent  to
88              the printer.
89               The output file '-' can not be used with this option.
90
91       -printdlg
92              (Windows  only)  Prints  to a system printer. Displays the print
93              dialog to allow the print options to be modified  before  print‐
94              ing.
95
96       -f number
97              Specifies the first page to convert.
98
99       -l number
100              Specifies the last page to convert.
101
102       -o     Generates only the odd numbered pages.
103
104       -e     Generates only the even numbered pages.
105
106       -singlefile
107              Writes only the first page and does not add digits.
108
109       -r number
110              Specifies  the  X  and Y resolution, in pixels per inch of image
111              files (or rasterized regions in vector output). The  default  is
112              150 PPI.
113
114       -rx number
115              Specifies  the  X  resolution, in pixels per inch of image files
116              (or rasterized regions in vector output).  The  default  is  150
117              PPI.
118
119       -ry number
120              Specifies  the  Y  resolution, in pixels per inch of image files
121              (or rasterized regions in vector output).  The  default  is  150
122              PPI.
123
124       -scale-to number
125              Scales  the  long  side of each page (width for landscape pages,
126              height for portrait pages) to fit in scale-to pixels.  The  size
127              of  the short side will be determined by the aspect ratio of the
128              page (PNG/JPEG/TIFF only).
129
130       -scale-to-x number
131              Scales each page horizontally to fit in  scale-to-x  pixels.  If
132              scale-to-y  is  set  to -1, the vertical size will determined by
133              the aspect ratio of the page (PNG/JPEG/TIFF only).
134
135       -scale-to-y number
136              Scales each page vertically to  fit  in  scale-to-y  pixels.  If
137              scale-to-x  is set to -1, the horizontal size will determined by
138              the aspect ratio of the page (PNG/JPEG/TIFF only).
139
140       -x number
141              Specifies the x-coordinate of the crop area top left  corner  in
142              pixels (image output) or points (vector output)
143
144       -y number
145              Specifies  the  y-coordinate of the crop area top left corner in
146              pixels (image output) or points (vector output)
147
148       -W number
149              Specifies the width of crop area in  pixels  (image  output)  or
150              points (vector output)  (default is 0)
151
152       -H number
153              Specifies  the  height  of crop area in pixels (image output) or
154              points (vector output)  (default is 0)
155
156       -sz number
157              Specifies the size of crop square in pixels  (image  output)  or
158              points (vector output)  (sets -W and -H)
159
160       -cropbox
161              Uses  the  crop  box  rather  than media box when generating the
162              files (PNG/JPEG/TIFF only)
163
164       -mono  Generate a monochrome file (PNG and TIFF only).
165
166       -gray  Generate a grayscale file (PNG, JPEG, and TIFF only).
167
168       -antialias
169              Set the cairo antialias option used  for  text  and  drawing  in
170              image  files  (or  rasterized  regions  in  vector  output). The
171              options are:
172
173              default
174                     Use the default antialiasing for the target device.  This
175                     is the default setting if -antialias is not used.
176
177              none   Antialiasing is disabled.
178
179              gray   Perform single-color antialiasing using shades of gray.
180
181              subpixel
182                     Perform  antialiasing by taking advantage of the order of
183                     subpixel elements on devices such as LCD.
184
185              fast   Hint that the backend should  perform  some  antialiasing
186                     but prefer speed over quality.
187
188              good   The backend should balance quality against performance.
189
190              best   Hint  that the backend should render at the highest qual‐
191                     ity, sacrificing speed if necessary.
192
193       -transp
194              Use a transparent page color instead  of  white  (PNG  and  TIFF
195              only).
196
197       -icc icc-file
198              Use the specified ICC file as the output profile (PNG only). The
199              profile will be embedded in the PNG file.
200
201       -jpegopt jpeg-options
202              When used with -jpeg, takes a list of  options  to  control  the
203              jpeg compression. See JPEG OPTIONS for the available options.
204
205       -level2
206              Generate Level 2 PostScript (PS only).
207
208       -level3
209              Generate  Level 3 PostScript (PS only). This enables all Level 2
210              features plus shading patterns and masked images.  This  is  the
211              default setting.
212
213       -origpagesizes
214              This option is the same as "-paper match".
215
216       -paper size
217              Set  the  paper  size to one of "letter", "legal", "A4", or "A3"
218              (PS,PDF,SVG only).  This can also be set to "match", which  will
219              set  the  paper size of each page to match the size specified in
220              the PDF file. If none the -paper, -paperw,  or  -paperh  options
221              are specified the default is to match the paper size.
222
223       -paperw size
224              Set the paper width, in points (PS,PDF,SVG only).
225
226       -paperh size
227              Set the paper height, in points (PS,PDF,SVG only).
228
229       -nocrop
230              By  default, printing output is cropped to the CropBox specified
231              in the PDF file.   This  option  disables  cropping  (PS,PDF,SVG
232              only).
233
234       -expand
235              Expand  PDF  pages  smaller  than  the  paper  to fill the paper
236              (PS,PDF,SVG only).  By default, these pages are not scaled.
237
238       -noshrink
239              Don't  scale  PDF  pages  which  are  larger  than   the   paper
240              (PS,PDF,SVG  only).  By default, pages larger than the paper are
241              shrunk to fit.
242
243       -nocenter
244              By default, PDF pages smaller than the paper (after any scaling)
245              are  centered  on  the  paper.   This  option  causes them to be
246              aligned  to  the  lower-left  corner  of   the   paper   instead
247              (PS,PDF,SVG only).
248
249       -duplex
250              Adds the %%IncludeFeature: *Duplex DuplexNoTumble DSC comment to
251              the PostScript file (PS only).  This tells the print manager  to
252              enable duplexing.
253
254       -printer printer-name
255              (Windows only). When used with -print, specifies the name of the
256              printer to be used, instead of the system default.
257
258       -printopt printer-options
259              (Windows only). When used with -print, takes a list  of  options
260              to be used to configure the printer. See WINDOWS PRINTER OPTIONS
261              for the available options.
262
263       -setupdlg
264              (Windows only). When used with -print,  the  printer  properties
265              dialog  is  displayed allowing the print settings to be modified
266              before printing. The paper size selected in the print properties
267              dialog will be used except when -origpagesizes is specified.
268
269       -opw password
270              Specify  the  owner  password  for the PDF file.  Providing this
271              will bypass all security restrictions.
272
273       -upw password
274              Specify the user password for the PDF file.
275
276       -q     Don't print any messages or errors.
277
278       -v     Print copyright and version information.
279
280       -h     Print usage information.  (-help and --help are equivalent.)
281

EXIT CODES

283       The poppler tools use the following exit codes:
284
285       0      No error.
286
287       1      Error opening a PDF file.
288
289       2      Error opening an output file.
290
291       3      Error related to PDF permissions.
292
293       4      Error related to ICC profile.
294
295       99     Other error.
296

JPEG OPTIONS

298       When JPEG output is specified, the -jpegopt option can be used to  con‐
299       trol  the  JPEG  compression parameters.  It takes a string of the form
300       "<opt>=<val>[,<opt>=<val>]". Currently the available options are:
301
302       quality
303              Selects the JPEG quality value. The value  must  be  an  integer
304              between 0 and 100.
305
306       progressive
307              Select  progressive  JPEG  output.  The possible values are "y",
308              "n",  indicating  progressive  (yes)  or  non-progressive  (no),
309              respectively.
310
311       optimize
312              Sets  whether  to  compute optimal Huffman coding tables for the
313              JPEG output, which will create smaller files but make  an  extra
314              pass  over the data. The value must be "y" or "n", with "y" per‐
315              forming optimization, otherwise the default Huffman  tables  are
316              used.
317

WINDOWS PRINTER OPTIONS

319       In Windows, you can use the -print option to print directly to a system
320       printer. Additionally, you can use the -printopt  option  to  configure
321       the printer. It takes a string of the form "<opt>=<val>[,<opt>=<val>]".
322       Currently the available options are:
323
324       source Selects the source paper tray to be  used  (bin).  The  possible
325              values  are  "upper",  "onlyone",  "lower",  "middle", "manual",
326              "envelope",   "envmanual",   "auto",   "tractor",    "smallfmt",
327              "largefmt", "largecapacity", "formsource", or a numeric value to
328              choose a driver specific source.
329
330       duplex Sets the duplex mode of the printer.  The  possible  values  are
331              "off",  "short"  or  "long", indicating no duplexing, short-edge
332              binding, or long-edge  binding,  respectively.   General  option
333              -duplex is a synonym of "duplex=long". If both options are spec‐
334              ified, -printopt has priority.
335

AUTHOR

337       The pdftocairo software and documentation are copyright 1996-2004 Glyph
338       & Cog, LLC and copyright 2005-2011 The Poppler Developers.
339

SEE ALSO

341       pdfdetach(1),   pdffonts(1),  pdfimages(1),  pdfinfo(1),  pdftohtml(1),
342       pdftoppm(1), pdftops(1), pdftotext(1) pdfseparate(1), pdfsig(1),  pdfu‐
343       nite(1)
344
345
346
347                                                                 pdftocairo(1)
Impressum