| 1 |
pdfdetach(1) General Commands Manual pdfdetach(1) |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
NAME |
| 6 |
pdfdetach - Portable Document Format (PDF) document embedded file ex- |
| 7 |
tractor (version 4.06) |
| 8 |
|
| 9 |
SYNOPSIS |
| 10 |
pdfdetach [options] [PDF-file] |
| 11 |
|
| 12 |
DESCRIPTION |
| 13 |
Pdfdetach lists or extracts embedded files (attachments) from a Porta- |
| 14 |
ble Document Format (PDF) file. |
| 15 |
|
| 16 |
CONFIGURATION FILE |
| 17 |
Pdfdetach reads a configuration file at startup. It first tries to |
| 18 |
find the user's private config file, ~/.xpdfrc. If that doesn't exist, |
| 19 |
it looks for a system-wide config file, typically /etc/xpdfrc (but this |
| 20 |
location can be changed when pdfinfo is built). See the xpdfrc(5) man |
| 21 |
page for details. |
| 22 |
|
| 23 |
OPTIONS |
| 24 |
Some of the following options can be set with configuration file com- |
| 25 |
mands. These are listed in square brackets with the description of the |
| 26 |
corresponding command line option. |
| 27 |
|
| 28 |
-list List all of the embedded files in the PDF file. File names are |
| 29 |
converted to the text encoding specified by the "-enc" switch. |
| 30 |
|
| 31 |
-save number |
| 32 |
Save the specified embedded file. By default, this uses the |
| 33 |
file name associated with the embedded file (as printed by the |
| 34 |
"-list" switch); the file name can be changed with the "-o" |
| 35 |
switch. |
| 36 |
|
| 37 |
-saveall |
| 38 |
Save all of the embedded files. This uses the file names asso- |
| 39 |
ciated with the embedded files (as printed by the "-list" |
| 40 |
switch). By default, the files are saved in the current direc- |
| 41 |
tory; this can be changed with the "-o" switch. |
| 42 |
|
| 43 |
-o path |
| 44 |
Set the file name used when saving an embedded file with the |
| 45 |
"-save" switch, or the directory used by "-saveall". |
| 46 |
|
| 47 |
-enc encoding-name |
| 48 |
Sets the encoding to use for text output (embedded file names). |
| 49 |
The encoding-name must be defined with the unicodeMap command |
| 50 |
(see xpdfrc(5)). This defaults to "Latin1" (which is a built-in |
| 51 |
encoding). [config file: textEncoding] |
| 52 |
|
| 53 |
-opw password |
| 54 |
Specify the owner password for the PDF file. Providing this |
| 55 |
will bypass all security restrictions. |
| 56 |
|
| 57 |
-upw password |
| 58 |
Specify the user password for the PDF file. |
| 59 |
|
| 60 |
-cfg config-file |
| 61 |
Read config-file in place of ~/.xpdfrc or the system-wide config |
| 62 |
file. |
| 63 |
|
| 64 |
-v Print copyright and version information. |
| 65 |
|
| 66 |
-h Print usage information. (-help and --help are equivalent.) |
| 67 |
|
| 68 |
EXIT CODES |
| 69 |
The Xpdf tools use the following exit codes: |
| 70 |
|
| 71 |
0 No error. |
| 72 |
|
| 73 |
1 Error opening a PDF file. |
| 74 |
|
| 75 |
2 Error opening an output file. |
| 76 |
|
| 77 |
3 Error related to PDF permissions. |
| 78 |
|
| 79 |
98 Out of memory. |
| 80 |
|
| 81 |
99 Other error. |
| 82 |
|
| 83 |
AUTHOR |
| 84 |
The pdfinfo software and documentation are copyright 1996-2025 Glyph & |
| 85 |
Cog, LLC. |
| 86 |
|
| 87 |
SEE ALSO |
| 88 |
xpdf(1), pdftops(1), pdftotext(1), pdftohtml(1), pdfinfo(1), pdf- |
| 89 |
fonts(1), pdftoppm(1), pdftopng(1), pdfimages(1), xpdfrc(5) |
| 90 |
http://www.xpdfreader.com/ |
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
14 Nov 2025 pdfdetach(1) |