Extract Attachments
This command extracts attachments from a PDF document. If you want to remove an extracted document you can do this using attach remove. Have a look at some examples.
Usage
pdfcpu attachments extract [-v(erbose)|vv] [-upw userpw] [-opw ownerpw] inFile outDir [file...]
Flags
name | description | required |
---|---|---|
verbose | turn on logging | no |
vv | verbose logging | no |
upw | user password | no |
opw | owner password | no |
Arguments
name | description | required |
---|---|---|
inFile | PDF input file | yes |
outDir | output directory | yes |
file… | one or more attachments to be extracted | yes |
Examples
Extract a specific attachment from ledger.pdf
into out
:
pdfcpu attach extract ledger.pdf out invoice1.pdf
extracting attachments from ledger.pdf into out ...
Extract all attachments of ledger.pdf
into out
:
pdfcpu attach extract ledger.pdf out *
extracting attachments from ledger.pdf into out ...