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       -enc encoding-name
73              Sets the encoding to use  for  text  output.  This  defaults  to
74              "UTF-8".
75
76       -listenc
77              Lists the available encodings
78
79       -eol unix | dos | mac
80              Sets the end-of-line convention to use for text output.
81
82       -nopgbrk
83              Don't insert page breaks (form feed characters) between pages.
84
85       -opw password
86              Specify  the  owner  password  for the PDF file.  Providing this
87              will bypass all security restrictions.
88
89       -upw password
90              Specify the user password for the PDF file.
91
92       -q     Don't print any messages or errors.
93
94       -v     Print copyright and version information.
95
96       -h     Print usage information.  (-help and --help are equivalent.)
97

BUGS

99       Some PDF files contain fonts whose encodings have been  mangled  beyond
100       recognition.  There is no way (short of OCR) to extract text from these
101       files.
102

EXIT CODES

104       The Xpdf tools use the following exit codes:
105
106       0      No error.
107
108       1      Error opening a PDF file.
109
110       2      Error opening an output file.
111
112       3      Error related to PDF permissions.
113
114       99     Other error.
115

AUTHOR

117       The pdftotext software and documentation are copyright 1996-2011  Glyph
118       & Cog, LLC.
119

SEE ALSO

121       pdfdetach(1),  pdffonts(1),  pdfimages(1),  pdfinfo(1),  pdftocairo(1),
122       pdftohtml(1), pdftoppm(1), pdftops(1), pdfseparate(1), pdfsig(1), pdfu‐
123       nite(1)
124
125
126
127                                15 August 2011                    pdftotext(1)
Impressum