cpdf

CLI to manipulate existing PDF files in a variety of ways.

TLDR

Select pages 1, 2, 3 and 6 from a source document and write those to a destination document

>_ cpdf [path/to/source_document.pdf] [1-3,6] -o [path/to/destination_document.pdf]
copy

Merge two documents into a new one

>_ cpdf -merge [path/to/source_document_one.pdf] [path/to/source_document_two.pdf] -o [path/to/destination_document.pdf]
copy

Show the bookmarks of a document

>_ cpdf -list-bookmarks [path/to/document.pdf]
copy

Split a document into ten-page chunks, writing them to chunk001.pdf, chunk002.pdf, etc

>_ cpdf -split [path/to/document.pdf] -o [path/to/chunk%%%.pdf] -chunk [10]
copy

Encrypt a document using 128bit encryption, providing fred as owner password and joe as user password

>_ cpdf -encrypt [128bit] [fred] [joe] [path/to/source_document.pdf] -o [path/to/encrypted_document.pdf]
copy

Decrypt a document using the owner password fred

>_ cpdf -decrypt [path/to/encrypted_document.pdf] owner=[fred] -o [path/to/decrypted_document.pdf]
copy

Show the annotations of a document

>_ cpdf -list-annotations [path/to/document.pdf]
copy

Create a new document from an existing one with additional metadata

>_ cpdf -set-metadata [path/to/metadata.xml] [path/to/source_document.pdf] -o [path/to/destination_document.pdf]
copy

Copied to clipboard
free 100$ digital ocean credit