Debian Codegraph @

libs/xpdf/xpdf-src/doc/pdfimages.1

raw
1 .\" Copyright 1998-2025 Glyph & Cog, LLC
2 .TH pdfimages 1 "14 Nov 2025"
3 .SH NAME
4 pdfimages \- Portable Document Format (PDF) image extractor
5 (version 4.06)
6 .SH SYNOPSIS
7 .B pdfimages
8 [options]
9 .I PDF-file image-root
10 .SH DESCRIPTION
11 .B Pdfimages
12 saves images from a Portable Document Format (PDF) file as Portable
13 Pixmap (PPM), Portable Graymap (PGM), Portable Bitmap (PBM), or JPEG
14 files.
15 .PP
16 Pdfimages reads the PDF file, scans one or more pages,
17 .IR PDF-file ,
18 and writes one PPM, PGM, PBM, or JPEG file for each image,
19 .IR image-root - nnnn . xxx ,
20 where
21 .I nnnn
22 is the image number and
23 .I xxx
24 is the image type (.ppm, .pgm, .pbm, .jpg).
25 .PP
26 NB: pdfimages extracts the raw image data from the PDF file, without
27 performing any additional transforms. Any rotation, clipping,
28 color inversion, etc. done by the PDF content stream is ignored.
29 .SH CONFIGURATION FILE
30 Pdfimages reads a configuration file at startup. It first tries to
31 find the user's private config file, ~/.xpdfrc. If that doesn't
32 exist, it looks for a system-wide config file, typically /etc/xpdfrc
33 (but this location can be changed when pdfimages is built). See the
34 .BR xpdfrc (5)
35 man page for details.
36 .SH OPTIONS
37 Many of the following options can be set with configuration file
38 commands. These are listed in square brackets with the description of
39 the corresponding command line option.
40 .TP
41 .BI \-f " number"
42 Specifies the first page to scan.
43 .TP
44 .BI \-l " number"
45 Specifies the last page to scan.
46 .TP
47 .B \-j
48 Normally, all images are written as PBM (for monochrome images), PGM
49 (for grayscale images), or PPM (for color images) files. With this
50 option, images in DCT format are saved as JPEG files. All non-DCT
51 images are saved in PBM/PGM/PPM format as usual. (Inline images are
52 always saved in PBM/PGM/PPM format.)
53 .TP
54 .B \-J
55 Write JPX / JPEG 2000 images as JPEG 2000 files (similar to "-j", but
56 for JPEG 2000).
57 .TP
58 .B \-raw
59 Write all images in PDF-native formats. Most of the formats are not
60 standard image formats, so this option is primarily useful as input to
61 a tool that generates PDF files. (Inline images are always saved in
62 PBM/PGM/PPM format.)
63 .TP
64 .B \-u
65 Write only one copy of each unique image. If the same image is used
66 multiple times, possibly across multiple pages, pdfimages will only
67 write one image file. "Uniqueness" is determined by looking for reuse
68 of image objects withiin the PDF file; if multiiple copies of an image
69 are embedded, pdfimages will treat them as separate, unique images.
70 .TP
71 .B \-list
72 Write a one-line summary to stdout for each image. The summary
73 provides the image file name, the page number, the image width and
74 height, the horizontal and vertical resolution (DPI) as drawn, the
75 color space type, and the number of bits per component (BPC).
76 .TP
77 .B \-listonly
78 Write a one-line summary to stdout for each image (similar to
79 "-list"), but do not generate any image files. If this option is used,
80 the "image-root" argument must not be provided.
81 .TP
82 .BI \-opw " password"
83 Specify the owner password for the PDF file. Providing this will
84 bypass all security restrictions.
85 .TP
86 .BI \-upw " password"
87 Specify the user password for the PDF file.
88 .TP
89 .B \-verbose
90 Print a status message (to stdout) before processing each page.
91 .RB "[config file: " printStatusInfo ]
92 .TP
93 .B \-q
94 Don't print any messages or errors.
95 .RB "[config file: " errQuiet ]
96 .TP
97 .BI \-cfg " config-file"
98 Read
99 .I config-file
100 in place of ~/.xpdfrc or the system-wide config file.
101 .TP
102 .B \-v
103 Print copyright and version information.
104 .TP
105 .B \-h
106 Print usage information.
107 .RB ( \-help
108 and
109 .B \-\-help
110 are equivalent.)
111 .SH EXIT CODES
112 The Xpdf tools use the following exit codes:
113 .TP
114 0
115 No error.
116 .TP
117 1
118 Error opening a PDF file.
119 .TP
120 2
121 Error opening an output file.
122 .TP
123 3
124 Error related to PDF permissions.
125 .TP
126 98
127 Out of memory.
128 .TP
129 99
130 Other error.
131 .SH AUTHOR
132 The pdfimages software and documentation are copyright 1998-2025 Glyph
133 & Cog, LLC.
134 .SH "SEE ALSO"
135 .BR xpdf (1),
136 .BR pdftops (1),
137 .BR pdftotext (1),
138 .BR pdftohtml (1),
139 .BR pdfinfo (1),
140 .BR pdffonts (1),
141 .BR pdfdetach (1),
142 .BR pdftoppm (1),
143 .BR pdftopng (1),
144 .BR xpdfrc (5)
145 .br
146 .B http://www.xpdfreader.com/