pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Remove Attachments

This command removes previously attached files from a PDF document. Have a look at some examples.

Usage

pdfcpu attachments remove inFile [ file... ] [flags]

Common Flags


Arguments

namedescriptionrequired
inFilePDF input file, use - to read from stdinyes
file…one or more attachments to be removedyes

Examples

Remove a specific attachment from container.pdf:

$ pdfcpu attachments remove container.pdf pdfcpu.zip
removing pdfcpu.zip

Remove all attachments:

$ pdfcpu attachments remove container.pdf
removing all attachments

Remove an attachment while reading the PDF from stdin:

$ cat report-with-source.pdf \
   | pdfcpu attachments remove - source.xlsx > report-without-source.pdf