# **pdftl - PDF tackle 0.19.0.post13** _A wannabe CLI compatible clone/extension of pdftk_ ## Usage ``` pdftl ... [] pdftl ... [] --- [...] ... [] ... pdftl help [ | ] pdftl help [help | sign | filter | input | --- | pages | output | examples | completion | all] pdftl --completion (bash | zsh | powershell) pdftl --version ``` |Operations|| |-|-| |`add_bookmarks`|Add top-level bookmarks| |`add_text`|Add user-specified text strings to PDF pages| |`attach_files`|Attach files to the output PDF| |`background`|Use a 1-page PDF as the background| |`booklet`|Impose pages into printable booklet signatures| |`burst`|Split a single PDF into multiple files| |`cat`|Concatenate pages from input PDFs into a new PDF| |`chop`|Chop pages into multiple smaller pieces| |`clip`|Clip page content to a rectangle| |`crop`|Crop pages to a rectangle| |`delete`|Delete pages from an input PDF| |`delete_annots`|Delete annotation info| |`delete_attachments`|Delete file attachments based on criteria| |`delete_blank`|Delete blank or near-blank pages| |`delete_bookmarks`|Delete bookmarks| |`delete_images`|Delete images| |`dump_annots`|Dump annotation info| |`dump_bookmarks`|Extract PDF bookmarks into YAML or JSON| |`dump_colorspaces`|Report color spaces used| |`dump_data`|Metadata, page and bookmark info (XML-escaped or JSON)| |`dump_data_annots`|Dump annotation info in pdftk style| |`dump_data_fields`|Print PDF form field data with XML-style escaping| |`dump_data_fields_utf8`|Print PDF form field data in UTF-8| |`dump_data_utf8`|Metadata, page and bookmark info (in UTF-8)| |`dump_dests`|Print named destination data to the console| |`dump_encryption`|Print PDF encryption details and user permissions| |`dump_files`|List file attachments| |`dump_images`|Extract PDF embedded image metadata to JSON| |`dump_layers`|Dump layer info (JSON)| |`dump_signatures`|List and validate digital signatures| |`dump_text`|Print PDF text data to the console or a file| |`fill_form`|Fill a PDF form| |`filter`|Do nothing (the default if `` is absent)| |`generate_fdf`|Generate an FDF file containing PDF form data| |`highlight`|Highlight text matching a regex pattern| |`inject`|Inject code at start or end of page content streams| |`insert`|Insert blank pages| |`modify_annots`|Modify properties of existing annotations| |`modify_layers`|Modify state, merge, or strip specific layers| |`montage`|Impose pages onto a grid layout| |`move`|Move pages to a new location| |`multibackground`|Use multiple pages as backgrounds| |`multistamp`|Stamp multiple pages onto an input PDF| |`mutate_content`|Mutate page content streams using a user-supplied Python script| |`normalize`|Reformat page content streams| |`optimize_images`|Optimize images| |`place`|Shift, scale, and spin page content| |`render`|Render PDF pages as images or a single rasterized PDF| |`replace`|Regex replacement on page content streams| |`rotate`|Rotate pages in a PDF| |`set`|Set document properties, viewer preferences, and page labels| |`shuffle`|Interleave pages from multiple input PDFs| |`stamp`|Stamp a 1-page PDF onto each page| |`unpack_files`|Unpack file attachments| |`unpause`|Remove 'pause' frames from a slide deck| |`update_bookmarks`|Replace PDF bookmarks from a YAML or JSON file| |`update_info`|Update PDF metadata from `dump_data` instructions| |`update_info_utf8`|Update PDF metadata from `dump_data_utf8` instructions| |`zoom`|Rescale entire pages| |Options|| |-|-| |`allow ...`|Specify permissions for encrypted files| |`compress`|Compress output file streams (default)| |`drop_info`|Discard document-level info metadata| |`drop_xfa`|Discard form XFA data if present| |`drop_xmp`|Discard document-level XMP metadata| |`encrypt_128bit`|Use 128 bit encryption (obsolete and insecure)| |`encrypt_40bit`|Use 40 bit encryption (obsolete, highly insecure)| |`encrypt_aes128`|Use 128 bit AES encryption (default)| |`encrypt_aes256`|Use 256 bit AES encryption| |`fast`|Skip stream recompression for faster saving| |`flatten`|Flatten annotations and form fields| |`keep_final_id`|Copy final input PDF's ID metadata to output| |`keep_first_id`|Copy first input PDF's ID metadata to output| |`linearize`|Linearize output file(s)| |`need_appearances`|Set a form rendering flag in the output PDF| |`no_encrypt_metadata`|Leave metadata unencrypted| |`output `|The output file path, or a template for `burst`| |`owner_pw `|Set owner password and encrypt output| |`replacement_font `|Replace the font used for all form fields with a TTF file| |`sign_cert `|Path to certificate PEM| |`sign_field `|Signature field name (default: `Signature1`)| |`sign_key `|Path to private key PEM| |`sign_pass_env `|Environment variable with `sign_cert` passphrase| |`sign_pass_prompt`|Prompt for `sign_cert` passphrase| |`uncompress`|Disable compression of output file streams| |`user_pw `|Set user password and encrypt output| |`verbose`|Turn on verbose output|