1 pdftotext(1) pdftotext(1)
6 pdftotext - Portable Document Format (PDF) to text con-
10 pdftotext [options] [PDF-file [text-file]]
13 Pdftotext converts Portable Document Format (PDF) files to
16 Pdftotext reads the PDF file, PDF-file, and writes a text
17 file, text-file. If text-file is not specified, pdftotext
18 converts file.pdf to file.txt. If text-file is '-', the
19 text is sent to stdout.
22 Pdftotext reads a configuration file at startup. It first
23 tries to find the user's private config file, ~/.xpdfrc.
24 If that doesn't exist, it looks for a system-wide config
25 file, typically /usr/local/etc/xpdfrc (but this location
26 can be changed when pdftotext is built). See the
27 xpdfrc(5) man page for details.
30 Many of the following options can be set with configura-
31 tion file commands. These are listed in square brackets
32 with the description of the corresponding command line
36 Specifies the first page to convert.
39 Specifies the last page to convert.
42 Maintain (as best as possible) the original physi-
43 cal layout of the text. The default is to 'undo'
44 physical layout (columns, hyphenation, etc.) and
45 output the text in reading order.
47 -raw Keep the text in content stream order. This is a
48 hack which often "undoes" column formatting, etc.
49 Use of raw mode is no longer recommended.
52 Generate a simple HTML file, including the meta
53 information. This simply wraps the text in <pre>
54 and </pre> and prepends the meta headers.
57 Sets the encoding to use for text output. The
58 encoding-name must be defined with the unicodeMap
59 command (see xpdfrc(5)). The encoding name is
60 case-sensitive. This defaults to "Latin1" (which
61 is a built-in encoding). [config file: textEncod-
65 Sets the end-of-line convention to use for text
66 output. [config file: textEOL]
69 Don't insert page breaks (form feed characters)
70 between pages. [config file: textPageBreaks]
73 Specify the owner password for the PDF file. Pro-
74 viding this will bypass all security restrictions.
77 Specify the user password for the PDF file.
79 -q Don't print any messages or errors. [config file:
83 Read config-file in place of ~/.xpdfrc or the sys-
86 -v Print copyright and version information.
88 -h Print usage information. (-help and --help are
92 Some PDF files contain fonts whose encodings have been
93 mangled beyond recognition. There is no way (short of
94 OCR) to extract text from these files.
97 The Xpdf tools use the following exit codes:
101 1 Error opening a PDF file.
103 2 Error opening an output file.
105 3 Error related to PDF permissions.
110 The pdftotext software and documentation are copyright
111 1996-2007 Glyph & Cog, LLC.
114 xpdf(1), pdftops(1), pdfinfo(1), pdffonts(1), pdftoppm(1),
115 pdfimages(1), xpdfrc(5)
116 http://www.foolabs.com/xpdf/
120 27 Febuary 2007 pdftotext(1)