Contents

1 Basic Usage
 1.1 Documentation
 1.2 Input and Output Files
 1.3 Input Ranges
 1.4 Working with Encrypted Documents
 1.5 Standard Input and Standard Output
 1.6 Doing Several Things at Once with AND
 1.7 Units
 1.8 Setting the Producer and Creator
 1.9 PDF Version Numbers
 1.10 File IDs
 1.11 Linearization
 1.12 Object Streams
 1.13 Malformed Files
 1.14 Error Handling
 1.15 Control Files
 1.16 String Arguments
 1.17 Text Encodings
 1.18 Font Embedding
 1.19 Creating a new PDF
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
 3.7 Showing Boxes and Printer’s Marks
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.1.1 Destinations
 6.2 Remove Bookmarks
 6.3 Add Bookmarks
 6.4 Opening bookmarks
7 Presentations
8 Watermarks and Stamps
 8.1 Add a Watermark or Logo
 8.2 Stamp Text, Dates and Times.
  8.2.1 Page Numbers
  8.2.2 Date and Time Formats
  8.2.3 Bates Numbers
  8.2.4 Position
  8.2.5 Font and Size
  8.2.6 Colors
  8.2.7 Outline Text
  8.2.8 Multi-line Text
  8.2.9 Special Characters
 8.3 Stamping Graphics
 8.4 Low-level facilities
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 Reading Document Information
 11.2 Setting Document Information
 11.3 XMP Metadata
 11.4 Upon Opening a Document
  11.4.1 Page Layout
  11.4.2 Page Mode
  11.4.3 Display Options
 11.5 Page Labels
12 File Attachments
 12.1 Adding Attachments
 12.2 Listing Attachments
 12.3 Removing Attachments
 12.4 Dumping Attachments to File
13 Working with Images
 13.1 Extracting images
 13.2 Detecting Low-resolution Images
 13.3 Removing an Image
14 Fonts
 14.1 Listing Fonts
 14.2 Copying Fonts
 14.3 Removing Fonts
 14.4 Missing Fonts
15 PDF and JSON
16 Optional Content Groups
17 Miscellaneous
 17.1 Draft Documents
 17.2 Blackening Text, Lines and Fills
 17.3 Hairline Removal
 17.4 Garbage Collection
 17.5 Change PDF Version Number
 17.6 Copy ID
 17.7 Remove ID
 17.8 List Spot Colours
 17.9 Removing Dictionary Entries
 17.10 Removing Clipping
A Dates
 A.1 PDF Date Format
 A.2 XMP Metadata Date Format