
PDF tooling for Go and the command line.
View the Project on GitHub pdfcpu/pdfcpu
Create a custom PDF page sequence.
Arrange your pages in any order you like.
Pages may appear multiple times.
Have a look at some examples.
pdfcpu collect inFile [outFile] --pages
| name | description | required |
|---|---|---|
| p(ages) | selected pages | yes |
| name | description | required | default |
|---|---|---|---|
| inFile | PDF input file, use - to read from stdin | yes | |
| outFile | PDF output file, use - to write to stdout | no | inFile |
Create a custom page collection from in.pdf and write the result to out.pdf.
Begin with 3 instances of page 1 then append the rest of the file excluding the last page:
$ pdfcpu collect in.pdf out.pdf --pages 1,1,1,2-l-1
writing sequ.pdf ...
Collect selected pages from stdin and write the result to stdout:
$ aws s3 cp s3://acme-dataroom/deck.pdf - \
| pdfcpu collect --pages 1,3,5-7 - - \
| aws s3 cp - s3://acme-dataroom/executive-extract.pdf