1pdftotext(1) General Commands Manual pdftotext(1)
2
3
4
6 pdftotext - Portable Document Format (PDF) to text converter (version
7 3.00)
8
10 pdftotext [options] [PDF-file [text-file]]
11
13 Pdftotext converts Portable Document Format (PDF) files to plain text.
14
15 Pdftotext reads the PDF file, PDF-file, and writes a text file, text-
16 file. If text-file is not specified, pdftotext converts file.pdf to
17 file.txt. If text-file is ´-', the text is sent to stdout.
18
20 -f number
21 Specifies the first page to convert.
22
23 -l number
24 Specifies the last page to convert.
25
26 -r number
27 Specifies the resolution, in DPI. The default is 72 DPI.
28
29 -x number
30 Specifies the x-coordinate of the crop area top left corner
31
32 -y number
33 Specifies the y-coordinate of the crop area top left corner
34
35 -W number
36 Specifies the width of crop area in pixels (default is 0)
37
38 -H number
39 Specifies the height of crop area in pixels (default is 0)
40
41 -layout
42 Maintain (as best as possible) the original physical layout of
43 the text. The default is to ´undo' physical layout (columns,
44 hyphenation, etc.) and output the text in reading order.
45
46 -raw Keep the text in content stream order. This is a hack which
47 often "undoes" column formatting, etc. Use of raw mode is no
48 longer recommended.
49
50 -htmlmeta
51 Generate a simple HTML file, including the meta information.
52 This simply wraps the text in <pre> and </pre> and prepends the
53 meta headers.
54
55 -enc encoding-name
56 Sets the encoding to use for text output. This defaults to
57 "UTF-8".
58
59 -listenc
60 Lits the available encodings
61
62 -eol unix | dos | mac
63 Sets the end-of-line convention to use for text output.
64
65 -nopgbrk
66 Don't insert page breaks (form feed characters) between pages.
67
68 -opw password
69 Specify the owner password for the PDF file. Providing this
70 will bypass all security restrictions.
71
72 -upw password
73 Specify the user password for the PDF file.
74
75 -q Don't print any messages or errors.
76
77 -v Print copyright and version information.
78
79 -h Print usage information. (-help and --help are equivalent.)
80
82 Some PDF files contain fonts whose encodings have been mangled beyond
83 recognition. There is no way (short of OCR) to extract text from these
84 files.
85
87 The Xpdf tools use the following exit codes:
88
89 0 No error.
90
91 1 Error opening a PDF file.
92
93 2 Error opening an output file.
94
95 3 Error related to PDF permissions.
96
97 99 Other error.
98
100 The pdftotext software and documentation are copyright 1996-2004 Glyph
101 & Cog, LLC.
102
104 pdftops(1), pdfinfo(1), pdffonts(1), pdftoppm(1), pdfimages(1),
105
106
107
108 22 January 2004 pdftotext(1)