Debian Codegraph @

libs/xpdf/xpdf-src/doc/pdftohtml.cat

raw
1 pdftohtml(1) General Commands Manual pdftohtml(1)
2
3
4
5 NAME
6 pdftohtml - Portable Document Format (PDF) to HTML converter (version
7 4.06)
8
9 SYNOPSIS
10 pdftohtml [options] PDF-file HTML-dir
11
12 DESCRIPTION
13 Pdftohtml converts Portable Document Format (PDF) files to HTML.
14
15 Pdftohtml reads the PDF file, PDF-file, and places an HTML file for
16 each page, along with auxiliary images in the directory, HTML-dir. The
17 HTML directory will be created; if it already exists, pdftohtml will
18 report an error.
19
20 CONFIGURATION FILE
21 Pdftohtml reads a configuration file at startup. It first tries to
22 find the user's private config file, ~/.xpdfrc. If that doesn't exist,
23 it looks for a system-wide config file, typically /etc/xpdfrc (but this
24 location can be changed when pdftohtml is built). See the xpdfrc(5)
25 man page for details.
26
27 OPTIONS
28 Many of the following options can be set with configuration file com-
29 mands. These are listed in square brackets with the description of the
30 corresponding command line option.
31
32 -f number
33 Specifies the first page to convert.
34
35 -l number
36 Specifies the last page to convert.
37
38 -z number
39 Specifies the initial zoom level. The default is 1.0, which
40 means 72dpi, i.e., 1 point in the PDF file will be 1 pixel in
41 the HTML. Using '-z 1.5', for example, will make the initial
42 view 50% larger.
43
44 -r number
45 Specifies the resolution, in DPI, for background images. This
46 controls the pixel size of the background image files. The ini-
47 tial zoom level is controlled by the '-z' option. Specifying a
48 larger '-r' value will allow the viewer to zoom in farther with-
49 out upscaling artifacts in the background.
50
51 -noframe
52 The default is to generate an 'index.html' page with a sidebar
53 listing all of the pages and a viewing area containing the cur-
54 rent page in an HTML iframe. This option switches back to the
55 older (pre-4.06) behavior of generating a very simple index page
56 that just has links to the pages.
57
58 -vstretch number
59 Specifies a vertical stretch factor. Setting this to a value
60 greater than 1.0 will stretch each page vertically, spreading
61 out the lines. This also stretches the background image to
62 match.
63
64 -embedbackground
65 Embeds the background image as base64-encoded data directly in
66 the HTML file, rather than storing it as a separate file.
67
68 -nofonts
69 Disable extraction of embedded fonts. By default, pdftohtml ex-
70 tracts TrueType and OpenType fonts. Disabling extraction can
71 work around problems with buggy fonts.
72
73 -embedfonts
74 Embeds any extracted fonts as base64-encoded data directly in
75 the HTML file, rather than storing them as separate files.
76
77 -skipinvisible
78 Don't draw invisible text. By default, invisible text (commonly
79 used in OCR'ed PDF files) is drawn as transparent (alpha=0) HTML
80 text. This option tells pdftohtml to discard invisible text en-
81 tirely.
82
83 -allinvisible
84 Treat all text as invisible. By default, regular (non-invisi-
85 ble) text is not drawn in the background image, and is instead
86 drawn with HTML on top of the image. This option tells pdfto-
87 html to include the regular text in the background image, and
88 then draw it as transparent (alpha=0) HTML text.
89
90 -formfields
91 Convert AcroForm text and checkbox fields to HTML input ele-
92 ments. This also removes text (e.g., underscore characters) and
93 erases background image content (e.g., lines or boxes) in the
94 field areas.
95
96 -meta Include PDF document metadata as 'meta' elements in the HTML
97 header.
98
99 -table Use table mode when performing the underlying text extraction.
100 This will generally produce better output when the PDF content
101 is a full-page table. NB: This does not generate HTML tables;
102 it just changes the way text is split up.
103
104 -overwrite
105 By default pdftohtml will not overwrite the specified output di-
106 rectory. If the directory already exists, pdftohtml will exit
107 with an error. This option tells pdftohtml to instead overwrite
108 the existing directory.
109
110 -opw password
111 Specify the owner password for the PDF file. Providing this
112 will bypass all security restrictions.
113
114 -upw password
115 Specify the user password for the PDF file.
116
117 -verbose
118 Print a status message (to stdout) before processing each page.
119 [config file: printStatusInfo]
120
121 -q Don't print any messages or errors. [config file: errQuiet]
122
123 -cfg config-file
124 Read config-file in place of ~/.xpdfrc or the system-wide config
125 file.
126
127 -v Print copyright and version information.
128
129 -h Print usage information. (-help and --help are equivalent.)
130
131 BUGS
132 Some PDF files contain fonts whose encodings have been mangled beyond
133 recognition. There is no way (short of OCR) to extract text from these
134 files.
135
136 EXIT CODES
137 The Xpdf tools use the following exit codes:
138
139 0 No error.
140
141 1 Error opening a PDF file.
142
143 2 Error opening an output file.
144
145 3 Error related to PDF permissions.
146
147 98 Out of memory.
148
149 99 Other error.
150
151 AUTHOR
152 The pdftohtml software and documentation are copyright 1996-2025 Glyph
153 & Cog, LLC.
154
155 SEE ALSO
156 xpdf(1), pdftops(1), pdftotext(1), pdfinfo(1), pdffonts(1), pdfde-
157 tach(1), pdftoppm(1), pdftopng(1), pdfimages(1), xpdfrc(5)
158 http://www.xpdfreader.com/
159
160
161
162 14 Nov 2025 pdftohtml(1)