Debian Codegraph @

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

raw
1 .\" Copyright 2017-2025 Glyph & Cog, LLC
2 .TH pdftopng 1 "14 Nov 2025"
3 .SH NAME
4 pdftopng \- Portable Document Format (PDF) to Portable Network Graphics
5 (PNG) converter (version 4.06)
6 .SH SYNOPSIS
7 .B pdftopng
8 [options]
9 .I PDF-file PNG-root
10 .SH DESCRIPTION
11 .B Pdftopng
12 converts Portable Document Format (PDF) files to color, grayscale, or
13 monochrome image files in Portable Network Graphics (PNG) format.
14 .PP
15 Pdftopng reads the PDF file,
16 .IR PDF-file ,
17 and writes one PNG file for each page,
18 .IR PNG-root - nnnnnn .png,
19 where
20 .I nnnnnn
21 is the page number.
22 If
23 .I PNG-root
24 is \'-', the image is sent to stdout (this is probably only useful
25 when converting a single page).
26 .SH CONFIGURATION FILE
27 Pdftopng reads a configuration file at startup. It first tries to
28 find the user's private config file, ~/.xpdfrc. If that doesn't
29 exist, it looks for a system-wide config file, typically /etc/xpdfrc
30 (but this location can be changed when pdftopng is built). See the
31 .BR xpdfrc (5)
32 man page for details.
33 .SH OPTIONS
34 Many of the following options can be set with configuration file
35 commands. These are listed in square brackets with the description of
36 the corresponding command line option.
37 .TP
38 .BI \-f " number"
39 Specifies the first page to convert.
40 .TP
41 .BI \-l " number"
42 Specifies the last page to convert.
43 .TP
44 .BI \-r " number"
45 Specifies the resolution, in DPI. The default is 150 DPI.
46 .TP
47 .B \-mono
48 Generate a monochrome image (instead of a color image).
49 .TP
50 .B \-gray
51 Generate a grayscale image (instead of a color image).
52 .TP
53 .B \-alpha
54 Generate an alpha channel in the PNG file. This is only useful with
55 PDF files that have been constructed with a transparent background.
56 The \-alpha flag cannot be used with \-mono.
57 .TP
58 .BI \-rot " angle"
59 Rotate pages by 0 (the default), 90, 180, or 270 degrees.
60 .TP
61 .BI \-freetype " yes | no"
62 Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
63 This defaults to "yes".
64 .RB "[config file: " enableFreeType ]
65 .TP
66 .BI \-aa " yes | no"
67 Enable or disable font anti-aliasing. This defaults to "yes".
68 .RB "[config file: " antialias ]
69 .TP
70 .BI \-aaVector " yes | no"
71 Enable or disable vector anti-aliasing. This defaults to "yes".
72 .RB "[config file: " vectorAntialias ]
73 .TP
74 .BI \-opw " password"
75 Specify the owner password for the PDF file. Providing this will
76 bypass all security restrictions.
77 .TP
78 .BI \-upw " password"
79 Specify the user password for the PDF file.
80 .TP
81 .B \-verbose
82 Print a status message (to stdout) before processing each page.
83 .RB "[config file: " printStatusInfo ]
84 .TP
85 .B \-q
86 Don't print any messages or errors.
87 .RB "[config file: " errQuiet ]
88 .TP
89 .BI \-cfg " config-file"
90 Read
91 .I config-file
92 in place of ~/.xpdfrc or the system-wide config file.
93 .TP
94 .B \-v
95 Print copyright and version information.
96 .TP
97 .B \-h
98 Print usage information.
99 .RB ( \-help
100 and
101 .B \-\-help
102 are equivalent.)
103 .SH EXIT CODES
104 The Xpdf tools use the following exit codes:
105 .TP
106 0
107 No error.
108 .TP
109 1
110 Error opening a PDF file.
111 .TP
112 2
113 Error opening an output file.
114 .TP
115 3
116 Error related to PDF permissions.
117 .TP
118 98
119 Out of memory.
120 .TP
121 99
122 Other error.
123 .SH AUTHOR
124 The pdftopng software and documentation are copyright 1996-2025 Glyph
125 & Cog, LLC.
126 .SH "SEE ALSO"
127 .BR xpdf (1),
128 .BR pdftops (1),
129 .BR pdftotext (1),
130 .BR pdftohtml (1),
131 .BR pdfinfo (1),
132 .BR pdffonts (1),
133 .BR pdfdetach (1),
134 .BR pdftoppm (1),
135 .BR pdfimages (1),
136 .BR xpdfrc (5)
137 .br
138 .B http://www.xpdfreader.com/