1pdftotext(1)                General Commands Manual               pdftotext(1)
2
3
4

NAME

6       pdftotext  -  Portable Document Format (PDF) to text converter (version
7       3.03)
8

SYNOPSIS

10       pdftotext [options] [PDF-file [text-file]]
11

DESCRIPTION

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.   If  PDF-
18       file is ´-', it reads the PDF file from stdin.
19

OPTIONS

21       -f number
22              Specifies the first page to convert.
23
24       -l number
25              Specifies the last page to convert.
26
27       -r number
28              Specifies the resolution, in DPI.  The default is 72 DPI.
29
30       -x number
31              Specifies the x-coordinate of the crop area top left corner
32
33       -y number
34              Specifies the y-coordinate of the crop area top left corner
35
36       -W number
37              Specifies the width of crop area in pixels (default is 0)
38
39       -H number
40              Specifies the height of crop area in pixels (default is 0)
41
42       -layout
43              Maintain  (as  best as possible) the original physical layout of
44              the text.  The default is to ´undo'  physical  layout  (columns,
45              hyphenation, etc.) and output the text in reading order.
46
47       -fixed number
48              Assume fixed-pitch (or tabular) text, with the specified charac‐
49              ter width (in points).  This forces physical layout mode.
50
51       -raw   Keep the text in content stream order.  This is a hack which of‐
52              ten  "undoes"  column  formatting,  etc.   Use of raw mode is no
53              longer recommended.
54
55       -nodiag
56              Discard diagonal text (i.e., text that is not close  to  one  of
57              the 0, 90, 180, or 270 degree axes). This is useful for skipping
58              watermarks drawn on body text.
59
60       -htmlmeta
61              Generate a simple HTML file,  including  the  meta  information.
62              This  simply wraps the text in <pre> and </pre> and prepends the
63              meta headers.
64
65       -bbox  Generate an XHTML file containing bounding box  information  for
66              each word in the file.
67
68       -bbox-layout
69              Generate  an  XHTML file containing bounding box information for
70              each block, line, and word in the file.
71
72       -cropbox
73              Use the crop box rather than the media box with -bbox and -bbox-
74              layout.
75
76       -colspacing number
77              Specifies  how much spacing we allow after a word before consid‐
78              ering adjacent text to be a new column, measured as  a  fraction
79              of the font size. Current default is 0.7, old releases had a 0.3
80              default.
81
82       -enc encoding-name
83              Sets the encoding to use  for  text  output.  This  defaults  to
84              "UTF-8".
85
86       -listenc
87              Lists the available encodings
88
89       -eol unix | dos | mac
90              Sets the end-of-line convention to use for text output.
91
92       -nopgbrk
93              Don't insert page breaks (form feed characters) between pages.
94
95       -opw password
96              Specify  the  owner  password  for the PDF file.  Providing this
97              will bypass all security restrictions.
98
99       -upw password
100              Specify the user password for the PDF file.
101
102       -q     Don't print any messages or errors.
103
104       -v     Print copyright and version information.
105
106       -h     Print usage information.  (-help and --help are equivalent.)
107

BUGS

109       Some PDF files contain fonts whose encodings have been  mangled  beyond
110       recognition.  There is no way (short of OCR) to extract text from these
111       files.
112

EXIT CODES

114       The Xpdf tools use the following exit codes:
115
116       0      No error.
117
118       1      Error opening a PDF file.
119
120       2      Error opening an output file.
121
122       3      Error related to PDF permissions.
123
124       99     Other error.
125

AUTHOR

127       The pdftotext software and documentation are copyright 1996-2011  Glyph
128       & Cog, LLC.
129

SEE ALSO

131       pdfdetach(1),  pdffonts(1),  pdfimages(1),  pdfinfo(1),  pdftocairo(1),
132       pdftohtml(1), pdftoppm(1), pdftops(1), pdfseparate(1), pdfsig(1), pdfu‐
133       nite(1)
134
135
136
137                                15 August 2011                    pdftotext(1)
Impressum