Bringing apdf from vendor into main branch.
[AROS-Contrib.git] / apdf / doc / pdftotext.1
blobb0d43f2a6fd49459f418f348311b952bcf573d34
1 .\" Copyright 1997-2005 Glyph & Cog, LLC
2 .TH pdftotext 1 "17 August 2005"
3 .SH NAME
4 pdftotext \- Portable Document Format (PDF) to text converter
5 (version 3.01)
6 .SH SYNOPSIS
7 .B pdftotext
8 [options]
9 .RI [ PDF-file
10 .RI [ text-file ]]
11 .SH DESCRIPTION
12 .B Pdftotext
13 converts Portable Document Format (PDF) files to plain text.
14 .PP
15 Pdftotext reads the PDF file,
16 .IR PDF-file ,
17 and writes a text file,
18 .IR text-file .
20 .I text-file
21 is not specified, pdftotext converts
22 .I file.pdf
24 .IR file.txt .
25 If 
26 .I text-file
27 is \'-', the text is sent to stdout.
28 .SH CONFIGURATION FILE
29 Pdftotext reads a configuration file at startup.  It first tries to
30 find the user's private config file, ~/.xpdfrc.  If that doesn't
31 exist, it looks for a system-wide config file, typically
32 /usr/local/etc/xpdfrc (but this location can be changed when pdftotext
33 is built).  See the
34 .BR xpdfrc (5)
35 man page for details.
36 .SH OPTIONS
37 Many of the following options can be set with configuration file
38 commands.  These are listed in square brackets with the description of
39 the corresponding command line option.
40 .TP
41 .BI \-f " number"
42 Specifies the first page to convert.
43 .TP
44 .BI \-l " number"
45 Specifies the last page to convert.
46 .TP
47 .B \-layout
48 Maintain (as best as possible) the original physical layout of the
49 text.  The default is to \'undo' physical layout (columns,
50 hyphenation, etc.) and output the text in reading order.
51 .TP
52 .B \-raw
53 Keep the text in content stream order.  This is a hack which often
54 "undoes" column formatting, etc.  Use of raw mode is no longer
55 recommended.
56 .TP
57 .B \-htmlmeta
58 Generate a simple HTML file, including the meta information.  This
59 simply wraps the text in <pre> and </pre> and prepends the meta
60 headers.
61 .TP
62 .BI \-enc " encoding-name"
63 Sets the encoding to use for text output.  The
64 .I encoding\-name
65 must be defined with the unicodeMap command (see
66 .BR xpdfrc (5)).
67 The encoding name is case-sensitive.  This defaults to "Latin1" (which
68 is a built-in encoding).
69 .RB "[config file: " textEncoding ]
70 .TP
71 .BI \-eol " unix | dos | mac"
72 Sets the end-of-line convention to use for text output.
73 .RB "[config file: " textEOL ]
74 .TP
75 .B \-nopgbrk
76 Don't insert page breaks (form feed characters) between pages.
77 .RB "[config file: " textPageBreaks ]
78 .TP
79 .BI \-opw " password"
80 Specify the owner password for the PDF file.  Providing this will
81 bypass all security restrictions.
82 .TP
83 .BI \-upw " password"
84 Specify the user password for the PDF file.
85 .TP
86 .B \-q
87 Don't print any messages or errors.
88 .RB "[config file: " errQuiet ]
89 .TP
90 .BI \-cfg " config-file"
91 Read
92 .I config-file
93 in place of ~/.xpdfrc or the system-wide config file.
94 .TP
95 .B \-v
96 Print copyright and version information.
97 .TP
98 .B \-h
99 Print usage information.
100 .RB ( \-help
102 .B \-\-help
103 are equivalent.)
104 .SH BUGS
105 Some PDF files contain fonts whose encodings have been mangled beyond
106 recognition.  There is no way (short of OCR) to extract text from
107 these files.
108 .SH EXIT CODES
109 The Xpdf tools use the following exit codes:
112 No error.
115 Error opening a PDF file.
118 Error opening an output file.
121 Error related to PDF permissions.
124 Other error.
125 .SH AUTHOR
126 The pdftotext software and documentation are copyright 1996-2005 Glyph
127 & Cog, LLC.
128 .SH "SEE ALSO"
129 .BR xpdf (1),
130 .BR pdftops (1),
131 .BR pdfinfo (1),
132 .BR pdffonts (1),
133 .BR pdftoppm (1),
134 .BR pdfimages (1),
135 .BR xpdfrc (5)
137 .B http://www.foolabs.com/xpdf/