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

  1. pdfcpu attachments extract [-v(erbose)|vv] [-upw userpw] [-opw ownerpw] inFile outDir [file...]

Flags

namedescriptionrequired
verboseturn on loggingno
vvverbose loggingno
upwuser passwordno
opwowner passwordno

Arguments

namedescriptionrequired
inFilePDF input fileyes
outDiroutput directoryyes
file…one or more attachments to be extractedyes

Examples

Extract a specific attachment from ledger.pdf into out:

  1. pdfcpu attach extract ledger.pdf out invoice1.pdf
  2. extracting attachments from ledger.pdf into out ...

Extract all attachments of ledger.pdf into out:

  1. pdfcpu attach extract ledger.pdf out *
  2. extracting attachments from ledger.pdf into out ...