cpdf: add page (#3713)

client-spec/clarity
Andrik Albuquerque 2019-12-30 22:18:28 -03:00 committed by Iván
parent fea5874287
commit db65c5bfb4
1 changed files with 36 additions and 0 deletions

36
pages/common/cpdf.md Normal file
View File

@ -0,0 +1,36 @@
# cpdf
> CLI to manipulate existing PDF files in a variety of ways.
> Homepage: <https://www.coherentpdf.com/cpdfmanual/cpdfmanual.html>.
- Select pages 1, 2, 3 and 6 from source document and write those to a destination document:
`cpdf {{path/to/source_document.pdf}} 1-3,6 -o {{path/to/destination_document.pdf}}`
- 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}}`
- Show the bookmarks of a document:
`cpdf -list-bookmarks {{path/to/document.pdf}}`
- 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`
- 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}}`
- Decrypt a document using the owner password `fred`:
`cpdf -decrypt {{path/to/encrypted_document.pdf}} owner=fred -o {{path/to/decrypted_document.pdf}}`
- Show the annotations of a document:
`cpdf -list-annotations {{path/to/document.pdf}}`
- Create a new document, with metadata, based on an existing one:
`cpdf -set-metadata {{path/to/metadata.xml}} {{path/to/source_document.pdf}} -o {{path/to/destination_document.pdf}}`