pdfimages.1 6.07 KB
Newer Older
1 2
.\" Copyright 1998-2011 Glyph & Cog, LLC
.TH pdfimages 1 "15 August 2011"
3 4
.SH NAME
pdfimages \- Portable Document Format (PDF) image extractor
5
(version 3.03)
6 7 8 9 10 11 12
.SH SYNOPSIS
.B pdfimages
[options]
.I PDF-file image-root
.SH DESCRIPTION
.B Pdfimages
saves images from a Portable Document Format (PDF) file as Portable
13
Pixmap (PPM), Portable Bitmap (PBM), Portable Network Graphics (PNG),
14
Tagged Image File Format (TIFF), JPEG, JPEG2000, or JBIG2 files.
15 16 17
.PP
Pdfimages reads the PDF file
.IR PDF-file ,
18
scans one or more pages, and writes one file for each image,
19 20 21 22 23
.IR image-root - nnn . xxx ,
where
.I nnn
is the image number and
.I xxx
24
is the image type (.ppm, .pbm, .png, .tif, .jpg, jp2, jb2e, or jb2g).
25
.PP
26 27 28 29 30 31
The default output format is PBM (for monochrome images) or PPM for
non-monochrome. The \-png or \-tiff options change to default output
to PNG or TIFF respectively. If both \-png and \-tiff are specified,
CMYK images will be written as TIFF and all other images will be
written as PNG. In addition the \-j, \-jp2, and \-jbig2 options will
cause JPEG, JPEG2000, and JBIG2, respectively, images in the PDF file
32
to be written in their native format.
33 34 35 36 37 38 39 40
.SH OPTIONS
.TP
.BI \-f " number"
Specifies the first page to scan.
.TP
.BI \-l " number"
Specifies the last page to scan.
.TP
41 42 43 44 45 46
.B \-png
Change the default output format to PNG.
.TP
.B \-tiff
Change the default output format to TIFF.
.TP
47
.B \-j
48
Write images in JPEG format as JPEG files instead of the default format. The JPEG file is identical to the JPEG data stored in the PDF.
49
.TP
50 51 52
.B \-jp2
Write images in JPEG2000 format as JP2 files instead of the default format. The JP2 file is identical to the JPEG2000 data stored in the PDF.
.TP
53
.B \-jbig2
Pino Toscano's avatar
Pino Toscano committed
54
Write images in JBIG2 format as JBIG2 files instead of the default format. JBIG2 data in PDF is of the embedded type. The embedded type of JBIG2 has an optional separate file containing global data. The embedded data is written with the extension .jb2e and the global data (if available) will be written to the same image number with the extension .jb2g. The content of both these files is identical to the JBIG2 data in the PDF.
55
.TP
56 57
.B \-ccitt
Write images in CCITT format as CCITT files instead of the default
Adrian Johnson's avatar
Adrian Johnson committed
58
format. The CCITT file is identical to the CCITT data stored in the
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
PDF. PDF files contain additional parameters specifying
how to decode the CCITT data. These parameters are translated to
fax2tiff input options and written to a .params file with the same image
number. The parameters are:
.RS
.TP
.B \-1
1D Group 3 encoding
.TP
.B \-2
2D Group 3 encoding
.TP
.B \-4
Group 4 encoding
.TP
.B \-A
Beginning of line is aligned on a byte boundary
.TP
.B \-P
Beginning of line is not aligned on a byte boundary
.TP
.B \-X n
The image width in pixels
.TP
.B \-W
Encoding uses 1 for black and 0 for white
.TP
.B \-B
Encoding uses 0 for black and 1 for white
.TP
.B \-M
Input data fills from most significant bit to least significant bit.
.RE
.TP
93
.B \-all
94 95
Write JPEG, JPEG2000, JBIG2, and CCITT images in their native format. CMYK files are written as TIFF files. All other images are written as PNG files.
This is equivalent to specifying the options \-png \-tiff \-j \-jp2 \-jbig2 \-ccitt.
96
.TP
97 98 99 100 101
.B \-list
Instead of writing the images, list the images along with various information for each image. Do not specify an
.IR image-root
with this option.
.IP
102
The following information is listed for each image:
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
.RS
.TP
.B page
the page number containing the image
.TP
.B num
the image number
.TP
.B type
the image type:
.PP
.RS
image - an opaque image
.RE
.RS
mask - a monochrome mask image
.RE
.RS
smask - a soft-mask image
.RE
.RS
stencil - a monochrome mask image used for painting a color or pattern
.RE
.PP
Note: Tranparency in images is represented in PDF using a separate image for the image and the mask/smask.
The mask/smask used as part of a transparent image always immediately follows the image in the image list.
.TP
.B width
image width (in pixels)
.TP
.B height
image height (in pixels)
.PP
Note: the image width/height is the size of the embedded image, not the size the image will be rendered at.
.TP
.B color
image color space:
.PP
.RS
gray - Gray
.RE
.RS
rgb - RGB
.RE
.RS
cmyk - CMYK
.RE
.RS
lab - L*a*b
.RE
.RS
icc - ICC Based
.RE
.RS
index - Indexed Color
.RE
.RS
sep - Separation
.RE
.RS
devn - DeviceN
.RE
.TP
.B comp
number of color components
.TP
.B bpc
bits per component
.TP
.B enc
encoding:
.PP
.RS
image - raster image (may be Flate or LZW compressed but does not use an image encoding)
.RE
.RS
jpeg - Joint Photographic Experts Group
.RE
.RS
jp2 - JPEG2000
.RE
.RS
jbig2 - Joint Bi-Level Image Experts Group
.RE
.RS
ccitt - CCITT Group 3 or Group 4 Fax
.RE
.TP
.B interp
"yes" if the interpolation is to be performed when scaling up the image
.TP
.B object ID
Adrian Johnson's avatar
Adrian Johnson committed
195
the image dictionary object ID (number and generation)
196 197 198 199 200 201 202 203 204 205 206 207
.TP
.B x\-ppi
The horizontal resolution of the image (in pixels per inch) when rendered on the pdf page.
.TP
.B y\-ppi
The vertical resolution of the image (in pixels per inch) when rendered on the pdf page.
.TP
.B size
The size of the embedded image in the pdf file. The following suffixes are used: 'B' bytes, 'K' kilobytes, 'M' megabytes, and 'G' gigabytes.
.TP
.B ratio
The compression ratio of the embedded image.
208 209
.RE
.TP
210 211 212 213 214 215 216
.BI \-opw " password"
Specify the owner password for the PDF file.  Providing this will
bypass all security restrictions.
.TP
.BI \-upw " password"
Specify the user password for the PDF file.
.TP
Jakob Voss's avatar
Jakob Voss committed
217 218 219
.B \-p
Include page numbers in output file names.
.TP
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
.B \-q
Don't print any messages or errors.
.TP
.B \-v
Print copyright and version information.
.TP
.B \-h
Print usage information.
.RB ( \-help
and
.B \-\-help
are equivalent.)
.SH EXIT CODES
The Xpdf tools use the following exit codes:
.TP
0
No error.
.TP
1
Error opening a PDF file.
.TP
2
Error opening an output file.
.TP
3
Error related to PDF permissions.
.TP
99
Other error.
.SH AUTHOR
250
The pdfimages software and documentation are copyright 1998-2011 Glyph
251 252
& Cog, LLC.
.SH "SEE ALSO"
253
.BR pdfdetach (1),
254
.BR pdffonts (1),
255 256 257
.BR pdfinfo (1),
.BR pdftocairo (1),
.BR pdftohtml (1),
258
.BR pdftoppm (1),
259 260
.BR pdftops (1),
.BR pdftotext (1)
261 262
.BR pdfseparate (1),
.BR pdfsig (1),
263
.BR pdfunite (1)