pdftl - PDF tackle 0.25.1
A wannabe CLI compatible clone/extension of pdftk
Usage
pdftl <input>... <operation> [<option...>]
pdftl <input>... <operation> [<option...>] --- [<input>...] <operation>... [<option...>] ...
pdftl --args <file.yml>
pdftl help [<operation> | <option>]
pdftl help [help | args | sign | filter | input | --- | pages | output | examples | completion | all]
pdftl --completion (bash | zsh | powershell)
pdftl --version
Operations |
|
|---|---|
Add top-level bookmarks |
|
Stamp user-specified images onto PDF pages |
|
Add user-specified text strings to PDF pages |
|
Attach files to the output PDF |
|
Use a 1-page PDF as the background |
|
Generate and add a barcode to pages |
|
Impose pages into printable booklet signatures |
|
Split a single PDF into multiple files |
|
Concatenate pages from input PDFs into a new PDF |
|
Chop pages into multiple smaller pieces |
|
Clip page content to a rectangle |
|
Create a new PDF |
|
Crop pages to a rectangle |
|
Delete pages from an input PDF |
|
Delete action info |
|
Delete annotation info |
|
Delete file attachments based on criteria |
|
Delete blank or near-blank pages |
|
Delete bookmarks |
|
Delete images |
|
Automatically detect and correct document skew |
|
Diff the text content of two PDFs and output bounding boxes |
|
Dump action info |
|
Dump annotation info |
|
Extract PDF bookmarks into YAML or JSON |
|
Report color spaces used |
|
Metadata, page and bookmark info (XML-escaped or JSON) |
|
Dump annotation info in pdftk style |
|
Print PDF form field data with XML-style escaping |
|
Print PDF form field data in UTF-8 |
|
Metadata, page and bookmark info (in UTF-8) |
|
Print named destination data to the console |
|
Print PDF encryption details and user permissions |
|
List file attachments as JSON |
|
Extract font metadata |
|
Extract PDF embedded image metadata to JSON |
|
Dump layer info (JSON) |
|
List and validate digital signatures |
|
Dump page content streams as seen by |
|
Extract tables to JSON, CSV, or Markdown |
|
Inspect the PDF structure tree and reading order |
|
Print PDF text data to the console or a file |
|
Automatically locate and embed missing system fonts |
|
Export fonts and a JSON manifest for external editing |
|
Export images and a JSON manifest for external editing |
|
Fill a PDF form |
|
Do nothing (the default if |
|
Generate an FDF file containing PDF form data |
|
Match text patterns and get bounding boxes |
|
Highlight text matching a regex pattern |
|
Import edited fonts from a directory using a JSON manifest |
|
Import edited images from a directory using a JSON manifest |
|
Import and apply modified content streams |
|
Inject code at start or end of page content streams |
|
Insert blank pages |
|
Modify properties of existing annotations |
|
Apply in-place image pixel modifications and effects |
|
Modify state, merge, or strip specific layers |
|
Impose pages onto a grid layout |
|
Move pages to a new location |
|
Use multiple pages as backgrounds |
|
Stamp multiple pages onto an input PDF |
|
Mutate page content streams using a user-supplied Python script |
|
Reformat page content streams |
|
Optimize images |
|
Shift, scale, and spin page content |
|
Convert images to grayscale |
|
Make non-image page content gray |
|
Render PDF pages as images or a single rasterized PDF |
|
Regex replacement on page content streams |
|
Resample images |
|
Rotate pages in a PDF |
|
Start the pdftl API server |
|
Set document properties, viewer preferences, and page labels |
|
Interleave pages from multiple input PDFs |
|
Reduce vector path complexity |
|
Stamp a 1-page PDF onto each page |
|
Stamp PDF content into form fields |
|
Change appearance of text |
|
Auto-tag a PDF for accessibility using OpenDataLoader |
|
Unpack file attachments |
|
Remove ‘pause’ frames from a slide deck |
|
Replace PDF bookmarks from a YAML or JSON file |
|
Update PDF metadata from |
|
Update PDF metadata from |
|
Rescale entire pages |
Options |
|
|---|---|
|
Specify permissions for encrypted files |
|
Compress output file streams (default) |
|
Discard document-level info metadata |
|
Discard form XFA data if present |
|
Discard document-level XMP metadata |
|
Use 128 bit encryption (obsolete and insecure) |
|
Use 40 bit encryption (obsolete, highly insecure) |
|
Use 128 bit AES encryption (default) |
|
Use 256 bit AES encryption |
|
Skip stream recompression for faster saving |
|
Flatten annotations and form fields |
|
Copy final input PDF’s ID metadata to output |
|
Copy first input PDF’s ID metadata to output |
|
Linearize output file(s) |
|
Set a form rendering flag in the output PDF |
|
Leave metadata unencrypted |
|
The output file path, or a template for |
|
Set owner password and encrypt output |
|
Replace the font used for all form fields with a TTF file |
|
Path to certificate PEM |
|
Signature field name (default: |
|
Path to private key PEM |
|
Environment variable with |
|
Prompt for |
|
Disable compression of output file streams |
|
Set user password and encrypt output |
|
Turn on verbose output |