pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Add Attachments

This command embeds one or more files by attaching them to a PDF input file. Have a look at some examples.

Usage

pdfcpu attachments add inFile file [ , desc ]... [flags]

Common Flags


Arguments

namedescriptionrequired
inFilePDF input file, use - to read from stdinyes
file…one or more files to be attachedyes
descdescriptionno

Examples

Attach pictures to a coverpage PDF for easy content delivery:

$ pdfcpu attachments add album.pdf *.png
adding img1.png
adding img2.png
adding img3.png

Attach a file including a description:

$ pdfcpu attachments add invoice.pdf 'invoice.doc, my 1st desc'
adding invoice.doc

$ pdfcpu attachments list invoice.pdf
invoice.doc (my 1st desc)

Add an attachment while reading the PDF from stdin:

$ aws s3 cp s3://acme-archive/report.pdf - \
   | pdfcpu attachments add - source.xlsx > report-with-source.pdf