1pdftoppm(1) General Commands Manual pdftoppm(1)
2
3
4
6 pdftocairo - Portable Document Format (PDF) to
7 PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo
8
10 pdftocairo [options] PDF-file [output-file]
11
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 pdftocairo reads the PDF file, PDF-file, and writes to output-file.
32 The image formats (PNG, JPEG, and TIFF) generate one file per page with
33 the page number and file type appended to output-file (except when
34 -singlefile is used). When the output format is a vector format (PDF,
35 PS, EPS, and SVG) or when -singlefile is used, output-file is the full
36 filename.
37
38 If the PDF-file is “-” , the PDF is read from stdin. If the output-
39 file is “-” , the output file will be written to stdout. Using stdout
40 is not valid with image formats unless -singlefile is used. If output-
41 file is not used, the output filename will be derived from the PDF-file
42 filename.
43
44 Not all options are valid with all output formats. One (and only one)
45 of the output format options (-png, -jpeg, -tiff, -pdf, -ps, -eps, or
46 -svg) must be used.
47
48 The resolution options (-r, -rx, -ry) set the resolution of the image
49 output formats. The image dimensions will depend on the PDF page size
50 and the resolution. For the vector outputs, regions of the page that
51 can not be represented natively in the output format (eg translucency
52 in PS) will be rasterized at the resolution specified by the resolution
53 options.
54
55 The -scale-to options may be used to set a fixed image size. The image
56 resolution will vary with the page size.
57
58 The cropping options (-x, -y, -W, and -H) use units of pixels with the
59 image formats and PostScript points (1/72 inch) with the vector for‐
60 mats. When cropping is used with vector output the cropped region is
61 centered unless -nocenter is used in which case the cropped region is
62 at the top left (SVG) or bottom left (PDF, PS, EPS).
63
65 -png Generates a PNG file(s)
66
67 -jpeg Generates a JPEG file(s)
68
69 -tiff Generates a TIFF file(s)
70
71 -pdf Generates a PDF file
72
73 -ps Generate a PS file
74
75 -eps Generate an EPS file. An EPS file contains a single image, so if
76 you use this option with a multi-page PDF file, you must use -f
77 and -l to specify a single page. The page size options (-orig‐
78 pagesizes, -paper, -paperw, -paperh) can not be used with this
79 option.
80
81 -svg Generate a SVG (Scalable Vector Graphics) file
82
83 -f number
84 Specifies the first page to convert.
85
86 -l number
87 Specifies the last page to convert.
88
89 -o Generates only the odd numbered pages.
90
91 -e Generates only the even numbered pages.
92
93 -singlefile
94 Writes only the first page and does not add digits.
95
96 -r number
97 Specifies the X and Y resolution, in pixels per inch of image
98 files (or rasterized regions in vector output). The default is
99 150 PPI.
100
101 -rx number
102 Specifies the X resolution, in pixels per inch of image files
103 (or rasterized regions in vector output). The default is 150
104 PPI.
105
106 -ry number
107 Specifies the Y resolution, in pixels per inch of image files
108 (or rasterized regions in vector output). The default is 150
109 PPI.
110
111 -scale-to number
112 Scales the long side of each page (width for landscape pages,
113 height for portrait pages) to fit in scale-to pixels. The size
114 of the short side will be determined by the aspect ratio of the
115 page (PNG/JPEG/TIFF only).
116
117 -scale-to-x number
118 Scales each page horizontally to fit in scale-to-x pixels. If
119 scale-to-y is set to -1, the vertical size will determined by
120 the aspect ratio of the page (PNG/JPEG/TIFF only).
121
122 -scale-to-y number
123 Scales each page vertically to fit in scale-to-y pixels. If
124 scale-to-x is set to -1, the horizontal size will determined by
125 the aspect ratio of the page (PNG/JPEG/TIFF only).
126
127 -x number
128 Specifies the x-coordinate of the crop area top left corner in
129 pixels (image output) or points (vector output)
130
131 -y number
132 Specifies the y-coordinate of the crop area top left corner in
133 pixels (image output) or points (vector output)
134
135 -W number
136 Specifies the width of crop area in pixels (image output) or
137 points (vector output) (default is 0)
138
139 -H number
140 Specifies the height of crop area in pixels (image output) or
141 points (vector output) (default is 0)
142
143 -sz number
144 Specifies the size of crop square in pixels (image output) or
145 points (vector output) (sets -W and -H)
146
147 -cropbox
148 Uses the crop box rather than media box when generating the
149 files (PNG/JPEG/TIFF only)
150
151 -mono Generate a monochrome file (PNG and TIFF only).
152
153 -gray Generate a grayscale file (PNG, JPEG, and TIFF only).
154
155 -transp
156 Use a transparent page color instead of white (PNG and TIFF
157 only).
158
159 -icc icc-file
160 Use the specified ICC file as the output profile (PNG only). The
161 profile will be embedded in the PNG file.
162
163 -level2
164 Generate Level 2 PostScript (PS only).
165
166 -level3
167 Generate Level 3 PostScript (PS only). This enables all Level 2
168 features plus shading patterns and masked images. This is the
169 default setting.
170
171 -origpagesizes
172 This option is the same as "-paper match".
173
174 -paper size
175 Set the paper size to one of "letter", "legal", "A4", or "A3"
176 (PS,PDF,SVG only). This can also be set to "match", which will
177 set the paper size of each page to match the size specified in
178 the PDF file. If none the -paper, -paperw, or -paperh options
179 are specified the default is to match the paper size.
180
181 -paperw size
182 Set the paper width, in points (PS,PDF,SVG only).
183
184 -paperh size
185 Set the paper height, in points (PS,PDF,SVG only).
186
187 -nocrop
188 By default, printing output is cropped to the CropBox specified
189 in the PDF file. This option disables cropping (PS,PDF,SVG
190 only).
191
192 -expand
193 Expand PDF pages smaller than the paper to fill the paper
194 (PS,PDF,SVG only). By default, these pages are not scaled.
195
196 -noshrink
197 Don't scale PDF pages which are larger than the paper
198 (PS,PDF,SVG only). By default, pages larger than the paper are
199 shrunk to fit.
200
201 -nocenter
202 By default, PDF pages smaller than the paper (after any scaling)
203 are centered on the paper. This option causes them to be
204 aligned to the lower-left corner of the paper instead
205 (PS,PDF,SVG only).
206
207 -duplex
208 Adds the %%IncludeFeature: *Duplex DuplexNoTumble DSC comment to
209 the PostScript file (PS only). This tells the print manager to
210 enable duplexing.
211
212 -opw password
213 Specify the owner password for the PDF file. Providing this
214 will bypass all security restrictions.
215
216 -upw password
217 Specify the user password for the PDF file.
218
219 -q Don't print any messages or errors.
220
221 -v Print copyright and version information.
222
223 -h Print usage information. (-help and --help are equivalent.)
224
226 The poppler tools use the following exit codes:
227
228 0 No error.
229
230 1 Error opening a PDF file.
231
232 2 Error opening an output file.
233
234 3 Error related to PDF permissions.
235
236 4 Error related to ICC profile.
237
238 99 Other error.
239
241 The pdftocairo software and documentation are copyright 1996-2004 Glyph
242 & Cog, LLC and copyright 2005-2011 The Poppler Developers.
243
245 pdfdetach(1), pdffonts(1), pdfimages(1), pdfinfo(1), pdftohtml(1),
246 pdftoppm(1), pdftops(1), pdftotext(1)
247
248
249
250 pdftoppm(1)