Coherent PDF

Command Line Toolkit

User Manual
Version 2.2 (March 2017)

Coherent Graphics Ltd

For bug reports, feature requests and comments, email
contact@coherentgraphics.co.uk

©2017 Coherent Graphics Limited. All rights reserved. ISBN 978-0957671140

Adobe, Acrobat, Adobe PDF, Adobe Reader and PostScript are registered trademarks of Adobe Systems Incorporated. Windows, Powerpoint and Excel are registered trademarks of Microsoft Corporation.

Contents
Typographical Conventions
1 Basic Usage
 1.1 Input and Output Files
 1.2 Input Ranges
 1.3 Working with Encrypted Documents
 1.4 Standard Input and Standard Output
 1.5 Doing Several Things at Once with AND
 1.6 Units
 1.7 Setting the Producer and Creator
 1.8 PDF Version Numbers
 1.9 File IDs
 1.10 Linearization
 1.11 Object Streams
 1.12 Malformed Files
 1.13 Error Handling
 1.14 Control Files
 1.15 String Arguments
 1.16 Text Encodings
 1.17 Font Embedding
2 Merging and Splitting
 2.1 Merging
 2.2 Splitting
 2.3 Splitting on Bookmarks
 2.4 Encrypting with Split and Split Bookmarks
3 Pages
 3.1 Page Sizes
 3.2 Scale Pages
 3.3 Shift Page Contents
 3.4 Rotating Pages
 3.5 Flipping Pages
 3.6 Boxes and Cropping
4 Encryption and Decryption
 4.1 Introduction
 4.2 Encrypting a Document
 4.3 Decrypting a Document
5 Compression
 5.1 Decompressing a Document
 5.2 Compressing a Document
 5.3 Squeezing a Document
6 Bookmarks
 6.1 List Bookmarks
 6.2 Remove Bookmarks
 6.3 Add Bookmarks
7 Presentations
8 Watermarks and Stamps
 8.1 Add a Watermark or Logo
 8.2 Stamp Text, Dates and Times.
 8.3 Stamping Graphics
9 Multipage Facilities
 9.1 Two-up
 9.2 Inserting Blank Pages
10 Annotations
 10.1 List Annotations
 10.2 Copy Annotations
 10.3 Remove Annotations
11 Document Information and Metadata
 11.1 Listing Fonts
 11.2 Reading Document Information
 11.3 Setting Document Information
 11.4 Upon Opening a Document
 11.5 Metadata
 11.6 Page Labels
12 File Attachments
 12.1 Adding Attachments
 12.2 Listing Attachments
 12.3 Removing Attachments
13 Working with Images
 13.1 Detecting Low-resolution Images
14 Fonts
 14.1 Copying Fonts
 14.2 Removing Fonts
 14.3 Listing Missing Fonts
15 Miscellaneous
 15.1 Draft Documents
 15.2 Blackening Text, Lines and Fills
 15.3 Hairline Removal
 15.4 Garbage Collection
 15.5 Change PDF Version Number
 15.6 Copy ID
 15.7 Remove ID
 15.8 List Spot Colours
 15.9 Removing Dictionary Entries
 15.10 Remove Clipping
A Dates