This changelog format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
modify_layer_configsoperation: add, update, delete, rename or promote to default the named layer configurations (/OCProperties /Configs);dump_layersnow reports each configuration's locked layers and creator -
resample_imagesnow takesmono_dpi=<n>andthreshold=<x> -
subset_fontstakeskeep_type1, leaving Type 1 fonts unconverted (Poppler draws a font converted to CFF with slightly different glyph edges) -
shrinkoperation: makes a PDF smaller in one step, atlossless(default),balanced,strongorextreme, running pdftl's size-reduction passes in a benchmarked order;target=<size>picks the least lossy settings that fit -
delete_tagsoperation: deletes the structure tree (tags); pages look the same, but the file is no longer accessible -
compact_contentoperation: rewrites content streams in their shortest equivalent form -
merge_font_subsetsoperation: merges the per-page subsets of one TrueType or Type1C (CFF) font into one font -
deduplicate_xobjectsoperation: merges identical Form XObjects and link appearances -
round_text_positionsoperation: writes text positions with fewer digits, moving no glyph more than a tolerance -
photos_to_jpegoperation: re-encodes losslessly stored photographs as JPEG when the JPEG keeps their pixels and local structure (needs thephotos-to-jpegextra) -
mrc_compressoperation: splits scanned pages into a 1-bit text layer over low-resolution colour layers (needs themrc-compressextra) -
recompress,compress_xmp,drop_thumbnailsanddeflate zopflioutput options: recompress streams at maximum level, compress XMP metadata, drop page thumbnails, use zopfli -
renderworks in a pipeline, handing a later stage an image-only PDF -
PDFTL_PROFILE_MEMORY=<stage>|allwrites a memory profile of a CLI stage, and stages using more thanPDFTL_MEMORY_THRESHOLDMB say so -
Interactive password prompt support for encrypted PDFs (using
PROMPTorA=PROMPT).
-
Parsing an embedded Type 1 font program is now bounded in steps, operand stack and memory, so a crafted font can no longer hang pdftl or exhaust memory
-
Interpreting a glyph's charstring (reading CFF widths, converting Type 1 to CFF) is now bounded in work and subroutine nesting; a glyph with runaway subroutines is skipped rather than hanging or crashing the operation
-
modify_layers: a specific target now overrides a conflicting action forall, sohide all show Xreliably leaves X visible (it depended on Python's hash seed) andstrip all keep Xkeeps X; conflicting actions on the same target are an error -
dump_layers,modify_layers,modify_layer_configsand layer creation inoverlay,barcodeandredactno longer crash on malformed optional content: a lone dictionary where an array belongs (e.g./Configs), junk array entries, or a non-dictionary/Dor/Usage.dump_layersalso accepts an/Intentgiven as a single name, as the spec allows -
modify_layers strip/mergenow also removes the layers from/Locked,/RBGroupsand the/ASauto-state arrays -
modify_layers strip/mergenow handles content controlled by several layers through an optional content membership dictionary (OCMD) by its/Ppolicy or/VEexpression: such content was left untouched when marked, and an XObject was dropped (strip) or made permanent (merge) whenever any one of its layers was targeted -
modify_layers strip/mergenow applies to annotations: those on a stripped layer are deleted with their popups (form fields are also removed from the form), those on a merged layer become permanent, and layered content in appearance streams is stripped or merged like page content -
renderwith nooutputwritespage_1.png,page_2.png, ... as documented -
optimize_imagesnever makes an image bigger, also optimises inverted bitonal images (without changing a pixel), and atlowno longer re-encodes JPEGs -
resample_images,recolor_images,modify_imagesandrenderbound the memory they use, and running out of memory prints an error, not a traceback -
simplify_vectorsleaves alone a content stream it cannot fully parse, instead of dropping the unreadable parts -
exciseandredactno longer move surviving text: tidying the rewritten content stream dropped the line spacing a removed line'sTDhad set, movedT*ahead of aTm, and treated aTzrestored byQ(or inherited by a Form XObject) as redundant -
exciseandredactkeep a colour or font set just before aQwith no matchingq -
simplify_vectorsno longer makes a content stream bigger (it keeps the original when the simplified one would not compress smaller), uses less memory, and skips content streams over the newmax_stream_size(default 16MB) instead of exhausting memory on them -
subset_fontsno longer changes how text renders: it keeps a TrueType or CFF font's original font-wide bounding box (a recomputed, tighter one altered Poppler's rendering) -
subset_fontskeeps only the glyphs a PDF draws, and drops font tables PDF renderers never read (Office documents' fonts come out about half the size) -
subset_fontsno longer gives a simple TrueType font widths keyed by Unicode (/LastChar 8217), which made MuPDF draw each line's text on top of itself -
deduplicate_imagesanddeduplicate_xobjectsnow merge copies that differ only in the obsolete/Namekey, which ImageMagick sets per copy (a 36 MB photo PDF drops to 12 MB) -
The
oxipngstep of save-time recompression now works on Windows, where oxipng could not open the temporary file -
uncompressnow really stores streams uncompressed: streams that were already Flate-compressed in the input used to be copied still compressed -
Images decoded through the low-level fallback (used when pikepdf cannot extract an image, for example by
recolor_imagesandexport_images) now have their/Decodearray applied, like every other image, instead of coming out inverted; encoded image data that happened to be longer than the raw pixel size is no longer misread as raw pixels -
resample_imagesandmodify_imagesskip images Pillow cannot represent (such as 5-ink DeviceN "hi-fi" images) instead of aborting the whole operation -
Embedded Type 1 fonts with no eexec trailer (
/Length3 0, as TeX-produced PDFs commonly have) now get their widths read and patched, rather than silently skipped -
Embedded CFF fonts whose Top DICT omits
charset(meaning the standard ISOAdobe charset) now get their widths read and patched; patching such a font, or a CID-keyed one missing its charset, no longer crashes -
resample_images,modify_images,import_imagesandrecolor_imagesno longer invert images with a non-default/Decodearray (such as[1 0]bitonal scans, which came out as negatives) -
Over-aggressive content-stream cleanup in
exciseand redaction fixed -
unpause: raise error on unknown arguments instead of silently ignoring them -
bookletandmontage: validate and reject unknown configuration keys -
set_info: allow settingPdfID0metadata on PDFs lacking an existing trailer/IDarray -
delete_attachments: annotations of removed attachments are now removed too;minbytes/maxbytescompare the file size, not the compressed stream length -
dump_tags: linter now checks every inline (direct) structure element, not just the first -
simplify_vectors,excise: stroked rectangles no longer lose their fourth side; stroke merging no longer drops the closing edge of closed subpaths -
set_info: an invalidPageLabelStartnow skips the label, as its warning says, instead of writing/Stanyway -
dump_bookmarks,dump_data,tocanddelete_bookmarks: destinations that target structure elements now resolve to the correct page when the page reference is on a later inline child -
stamp_fields: inline widget kids after the first are no longer skipped -
Documentation fixes:
- Correct
FORCE_COLORStoFORCE_COLOR - Correct input handle lifetime documentation
- Clarify handle scoping for page ranges in
cat(e.g.,B2,4vsB2,B4)
- Correct
-
barcode: correct orientation on rotated pages
-
delete_images,export_images,import_images,recolor_images, andresample_imagesnow target inline images (BI/ID/EIcontent stream blocks), not just XObject images -
dump_annotsanddelete_annotsnow support filtering by nested annotation properties using slash-separated key paths, both by value and existence -
New output options:
drop_meta: discard all metadatadrop_vendor_extensions: discard private vendor/application data hung directly off the document catalogdrop_xmp_streams: discard all XMP metadata streams
-
usagenow reports private vendor/application data hung directly off the document catalog in a newvendor_extensioncategory, rather than as part ofdocument_structure -
modify_images:despeckletransformation now takes a size parameter -
optimize_imagesacceptsjbig2_group_sizeparameter to allow better compression -
helpnow prioritizes nearby keywords/help topics in the same pipline stage rather than always choosing the first one
-
dump_annotsanddelete_annotshandle malformed arguments better -
redactno longer leaves single-character regex matches (e.g./e/) in the content stream; glyph deletion now uses real overlap/containment against the glyph's own box (excise's newglyph_overlapoption) instead of only a center-point test -
modify_imagesnow finds images drawn through Form XObjects (common in scanned PDFs) instead of reporting that no images were found -
optimize_imagesno longer creates animagesdirectory next to the output file (or writes into an existing one); intermediate files now go in a temporary directory that is removed afterwards -
optimize_images: thejpg_quality=<n>option is no longer silently ignored -
dump_imagesandmodify_imagesno longer crash on images whose/Filteris an empty array -
server: oversized uploads are now rejected with a properly delivered 413 on Windows, instead of a connection error. -
server: correct stale file logging in verbose mode
-
dump_bookmarks: friendlierlaunch,goto_remote,named_actionkeys for/Launch,/GoToR, and/Namedoutline actions (previously a raw ISO action dict) -
exciseoutputs cleaner content streams
-
dump_imagesPPI calculation fixed to take CTM into account -
dump_imagesnow shows image masks -
dump_bookmarks/update_bookmarks: fix a crash on outline items with both/Destand/A(keeps/Dest) -
Bump minimum
pikepdfversion to fixAttributeErrorwhen reading page rotation duringcatoperations.
-
prune_resourcesoutput option -
deduplicate_icc_profilesoperation -
deduplicate_fontsoperation -
deduplicate_imagesoperation -
add_marksoperation -
usageoperation -
link_urlsoperation -
Can now give
chopan overlap -
redact: attempt to verify redaction success whenverify=trueis passed -
Custom CA certificate support added to
dump_signaturesvia newtrust_rootsoption, for deterministic trust chain verification. -
Friendly error handling when input and output filenames agree
-
redactnow redacts entire matches by default. Capturing groups(...)no longer narrow the target unlessredact*-named groups are explicitly used(?P<redact_foo>...). -
A warning is issued when saving will invalidate a signature
-
exciseandredactnow remove annotations whose rectangle cannot be determined -
replace,style_text,mutate_content,simplify_vectors,recolor_vectors,dump_streamsandimport_streamsnow also recurse into tiling Patterns, ExtGState soft-mask groups, and annotation appearance streams (previously only Form XObjects, or Forms+Patterns for the vector operations). Content painted through these mechanisms was silently skipped before; it is now processed like any other reachable content stream. -
Resolved an issue where signing PDFs inside an active async event loop could fail.
-
redactoperation -
exciseoperation -
add image format selection to
modify_images -
add automatic bookmark detection to
update_bookmarks
-
subset_fonts: add subset tags to font names -
add_text: improve system font matching -
modify_images: improvedposterizeto make colors more faithful -
dump_text: correctly handle type 3 fonts without /ToUnicode where possible
subset_fonts: improve Type 1 conversion performance
-
style_text: usestroke=noneto remove text stroke -
subset_fontsoperation
-
style_text: adding a stroke, by default, now uses the text fill color (if any) as the stroke color -
render: API now supports explicitformat=png|jpg|jpeg|pdfoutput selection. Image formats return a ZIP archive;format=pdfreturns a single rasterized PDF. The CLI continues to determine output format fromoutput. -
server:- UI enhancements to
builderinterface - server pipeline now takes understands
@Aper-operation arguments, allowing use ofstamp, for example
- UI enhancements to
-
dump_fontsandexport_fontsnow correctly scan annotation appearances for fonts -
unpack_filesnow correctly returns a zip archive when called via the server -
stamp,multistamp,background,multibackground: a PDF file argument to use as overlay/underlay is now required, per the documentation -
optimize_images: better errors on missingocrmypdfsystem dependencies -
delete,delete_blank,unpause,insert,move: page labels (/PageLabels) are now preserved and remapped across page deletion, insertion, and reordering, so surviving pages keep their original logical page numbers (e.g. roman-numeral front matter) instead of losing custom numbering. -
burst: each output chunk now preserves the ORIGINAL document's page labels/numbering rather than restarting at "1" — e.g. splitting a book by chapter keeps each chapter's pages numbered as they were in the whole book. This is an intentional deviation from classicpdftkburst behaviour, which has no equivalent concept. -
dump_bookmarks: strip trailing nulls from outline titles and metadata, like most PDF readers
server:- Replaced a racy
multiprocessing.Queue-based IPC mechanism for subprocess-isolated operation execution with aPipe-based protocol that correctly handles worker timeouts, crashes, and cleanup. This fixes intermittent hangs, leaked worker processes/pipes, and dropped/incorrect exception types under concurrent load. - Fixed a timeout error message that silently dropped the configured timeout value.
- Fixed a keep-alive connection handling bug where rejecting an oversized upload could leave the request thread blocked waiting on the remainder of an in-flight upload body.
- Fixed a per-worker memory limit that crashed workers outright on some platforms (notably macOS) instead of degrading gracefully.
- Replaced a racy
server: bounded the number of concurrent subprocess-isolated operation workers (default: capped to available CPU count, configurable viaPDFTL_MAX_CONCURRENT_WORKERS). Previously, a burst of concurrent requests could spawn an unbounded number of worker processes.
-
serveroperation -
deskewoperation -
stamp_fieldsoperation -
embed_fontsoperation -
--args <file.yml>argument insertion -
coalesce_strokesoption added tosimplify_vectors
-
sign_fieldno longer changes field appearances -
style_textnow adapts Tr (text rendering mode) better to user parameters -
improved project version-finding heuristics
-
dump_text: ifoutputis passed directly, we now write the text, not the PDF. -
rendernow initializes forms, so that they are properly rendered -
dump_signaturesnow correctly reports pyhanko's valid/invalid status
-
import_fontsoperation -
export_fontsoperation -
added
upscaleandadaptive_thresholdtomodify_images -
import_imagesoperation -
export_imagesoperation -
import_streamsoperation -
add_bookmarks: new options for bookmark specs:uri,launch,named,dest,color,bold,italic -
dump_colorspaces: CalGray, CalRGB, and Lab colour spaces now resolved and reported (previously silently fell through) -
dump_tags: non-standard structure tags now reported as warnings (ISO 32000-2 §14.8) -
dump_tags: invalid structure attributes now reported as warnings per standard owner definitions (ISO 32000-2 §14.8.5) -
fill_form: multi-select choice fields now supported (ISO 32000-2 §12.7.5.4) -
fill_form: radio buttons, checkboxes, list-boxes, and nested fields now handled correctly -
generate_fdf: optionalstatusstring in generated FDF output (ISO 32000-2 Table 246) -
generate_fdf: multi-select choice field arrays now serialized correctly in FDF output -
setoperation:trappedfield for document trapping status (True,False, orUnknown) -
setoperation:authornow accepts comma-separated values for multiple authors -
Bookmarks: non-GoTo actions (e.g.
Launch,Named,JavaScript) are now preserved when copying or round-tripping outlines viadump_bookmarks/add_bookmarks
-
Improved verbose pipeline logging feedback loops
-
Suppressed noisy metadata field conversion logging strings in
dump_data -
dump_streams: output header format changed fromPage <N>/Page <N> / XObject <name> (<obj>:<gen>)toPage <N> / Contents/ full nested breadcrumb paths (e.g.Page 1 / XObject /Fm1 / XObject /Fm0); obj:gen suffixes are no longer shown. Form XObjects reachable via more than one path now emit a% ALIAS OF: <canonical path>stub on repeat references instead of being silently skipped
-
dump_streams: content stream lines beginning with===or\are now escaped so they don't get misread as structural headers when round-tripped throughimport_streams -
Improve handling of OS errors while saving to disk
-
Improve handling of invalid or missing arguments in several operations
-
Destination coordinates for all ISO 32000-2 explicit destination types (
/FitH,/FitV,/FitR,/FitBH,/FitBV,/Fit,/FitB) now correctly transformed when rotating or scaling pages; previously only/XYZcoordinates were handled -
Null coordinate values in
/XYZdestinations now correctly preserved during rotation and scaling -
fill_form: digital signature fields are now safely skipped instead of corrupted -
Bookmarks: non-GoTo outline actions (e.g. URI links, launch actions) were silently dropped when merging PDFs; they are now preserved
-
Named destinations in legacy PDF 1.1
/Root/Destsdictionaries are now resolved correctly -
Structure destinations (ISO 32000-2 §12.3.2.3) in outlines now resolve to the correct page, with a fallback to page 1 if no content is found
-
setoperation: PDF 2.0 documents now correctly omit deprecated metadata fields from the/Infodictionary, per ISO 32000-2 §14.3.3
-
delete_actionsoperation -
dump_actionsoperation -
dump_tagsoperation -
tagoperation -
dump_streamsoperation -
simplify_vectorsoperation -
png_compressionsetting for therenderoperation -
operations are now linked in the HTML docs
replacenow recurses into XObjects by default
-
delete_imagesglobal mode fixed to delete per-page images too -
burstnow keeps outlines and annotations, likecat -
Prevent BrokenPipeError leaking out
-
add_imagesoperation -
diff_textoperation -
dump_tablesoperation -
modify_imagesoperation -
System font name and file path resolution for
add_text -
block repetition of page specs via
copy<N> -
multithreading for
resample_imagesandrecolor_images
-
page specs now tolerate whitespace (by stripping it before parsing)
-
dump_bookmarks: named destinations now resolved topage/viewby default; passno_resolveto skip -
update_bookmarks: strict schema validation; accepts structured data directly via API (bookmarks=kwarg)
-
Preserve outline state (open/closed, formatting) when copying outlines
-
Fix a crash when a subpipeline is passed as an operation argument
-
bash completion: fix mid-word completion behaviour, update docs
-
fix
style_textbugs: (1) coalesce content streams (2) handleSCetc -
add pattern support to
recolor_vectors
- auto-paged help output on linux/mac
-
rendershould no longer segfault when an unknown output file extension is passed -
dump_annotsnow properly passing the PDF down the pipeline -
Top margin percentage bug fixed in
clipandcrop
-
pipeline info added to
verbosemode -
make parentheses optional for
crop,clip,delete_blank,delete_images, andstyle_text, in many cases
-
repetitions in page specs via
rep<N> -
barcodeoperation -
recolor_imagesoperation -
recolor_vectorsoperation -
style_textoperation
-
Guess shell for
--completionif it is not specified -
add
{count}as an alias for{n}inadd_textandadd_bookmarks -
unpauseoperation -
dump_colorspacesoperation -
delete_attachmentsoperation -
dump_fontsoperation -
createoperation -
resample_imagesoperation -
grepoperation
-
Performance improvements in link/outline remapping
-
dump_filesoutput format changed to JSON, with more detail -
Several JSON dump output formats changed from flat lists to
{"name": [...]}format
- Fix crash on outline items without a /Title
-
Filter annotations in
dump_annotsanddelete_annots -
add
EACH...JOB, documented underpdftl help pipeline -
delete_bookmarksoperation -
add_bookmarksoperation -
add
{n}template toadd_text(andadd_bookmarks)
- Improve error message when too many files are opened
-
When
--debugis passed,optimize_imagesnow outputs ocrmypdf debug messages -
Improve error message for invalid page specs
-
dump_annots: fix crash caused by named destinations which are not valid python dictionary keys -
Updated API type stubs
-
Improve broken pipe handling: suppress tracebacks when piping to a pager
-
Improve test robustness (fixes #25)
-
zoomoperation -
fastoutput option
-
pipx-specific installation instructions for missing dependencies
-
help output uses executable name correctly
-
update_bookmarkscan now read bookmark data from stdin -
add_textsupports markdown-style hyperlinks -
sethandles common metadata, in both Info and XMP -
stamp,multistamp,background,multibackgroundaccept page specs -
help: link to readthedocs page
-
modify_layersnow hooks up print/view events (/AS dictionary) -
dump_layersreports /AS dictionary hookup as 'active' state
-
modify_layersoperation -
dump_imagesoperation -
highlightoperation -
stamp,background,multistamp,multibackground: option to add content in a new layer -
page ranges accept
portraitandlandscapequalifiers
- plain
renderarguments are now page specs, and we can output a multi-page render PDF
-
delete_blankoperation -
delete_imagesoperation
-
setoperation -
improve handling of unknown command line flags
-
suggest possible bug reporting on errors
-
CONTRIBUTING.md added
- work around a pyHanko bug affecting
dump_signatures
-
dump_encryptionoperation -
dump_bookmarksoperation -
update_bookmarksoperation
montage: removedfitparameter
-
pdftkcompatibility: default to all permissions denied -
montageandbookletbug handling pages with negative rotation fixed -
placeandadd_textrotation bugs fixed and visual tests added -
croprotation bugs fixed and visual tests added
-
page ranges accept
step<n>to step through a range in regular intervals -
burstaccepts page specs or bookmark levels for chunk split points, and chunk size limits
-
Completions updated
-
dump_textnow works in a pipeline, instead of crashing -
montageandbookletnow handle page rotation better -
pdftkcompatibility:burstnow outputs doc_data.txtdump_dataomits empty fields
- Minor shell completion performance improvements
-
Improved memory management
-
Fixed
chop,place, andbookletoperations to correctly calculate physical boundaries on pages with non-zero origins or non-standard/Rotateflags
-
Paper spec parser now falls back to landscape when missing an underscore (e.g.,
a4ltoa4_l). -
Pipeline execution now fails with an error if stage arguments cannot be parsed, rather than warning and proceeding.
-
Improved error messages for corrupted or invalid PDF files.
-
clipoperation: enclose page content in a clipping rectangle -
Absolute rectangle specifications for
cropandclip -
montageoperation: impose multiple pages onto a grid layout, useful for contact sheets and N-up handouts. Supports configurable grid size, canvas, margins, gutters, and aspect ratio control (fit=contain|fill). -
bookletoperation: reorder and impose pages for duplex booklet printing. Automatically pads to a multiple of 4, supports signature-based chunking (sig=N), custom canvas size, and right-to-left binding (rtl=true).
--versionnow displays core dependencies (pikepdf, libqpdf, python) and optional dependencies, along with a docs URL
-
cropwith an invalid spec now prints a clean error message instead of a traceback -
--versionno longer crashes if pikepdf is not installed
- Bug fix:
rendershould no longer save a PDF to the pattern file
- Inline pipeline substitution using new
JOBandDONEkeywords, documented underpdftl help pipeline
-
Bump pikepdf required version to 10.3.0 to enable better pdftk compatibility
-
Compatibility:
- Default to encrypt_aes128 encryption, the strongest which is pdftk compatible
- pdftl now passes the vendored pdftk-java test suite
-
Shell completion improvements and optimization
-
Respect XDG environment variables for cache and plugin directory on non-Windows
-
Performance improvements, particularly in
catanddump_data -
API now accepts
io.BytesIOas PDF inputs (as well aspathlib.Path, etc)
- Resolved issue with outlines (contents) when using
catwith named destinations
- Shell completion for bash, zsh and powershell
-
Performance improvements for
cat,shuffle, androtateoperations, especially regarding hyperlink handling. -
Invalid page arguments (e.g., requesting page 10 of a 5-page PDF) now return descriptive error messages instead of crashing.
-
delete: Now properly removes page resources, resulting in smaller output files. -
generate_fdf: Fixed an issue where generation could fail or produce invalid output when handlingNonevalues or specific binary string formats. -
The option parser (used in
add_text, etc.) now correctly handles unbalanced quotes by raising a descriptive error, preventing data corruption.
-
Replaced regex parsing with a state machine to prevent application hangs (ReDoS) when processing malformed quoted strings.
-
Now using
defusedxmlto avoidxml.etree.ElementTreevulnerabilities. -
Ensure passwords are redacted from all logging calls.
README.md,NOTICE.mdandCHANGELOG.mdupdated/corrected
-
mutate_contentoperation: mutate page content streams using a user-supplied Python script -
update_info: Support settingPdfID0to "RESET" to force valid ID regeneration on save. -
replacement_fontoption: change the font used for user text in forms
-
--versionincludes optional dependency versions -
Documentation updated for
dump_data,dump_annots, anddump_data_fieldsto better explain output formats and pdftk compatibility.
-
Compatibility:
generate_fdffixed andreplacement_fontimplemented. Now passes the pdftk-java tests using bleeding edgepikepdf. -
startup performance improvements: lazy loading, and working around heavy Rich formatting for default help text
-
Pipeline: Read-only operations (like
dump_text) now implicitly pass the input PDF to the next stage, fixing chained commands (e.g.,dump_text --- cat). -
Handling of features with missing dependencies should be more consistent.
-
Official support for Python 3.14
-
More comprehensive
vendor_tests/pdftk-javatest suite, frompdftk-java. This test suite only is licensed under the GPL 2, see NOTICE.md. -
no_encrypt_metadataoption: do not encrypt metadata. Only supported by AES encryption methods. -
COMPATIBILITY.md: compatibility notes -
dump_data_fieldsnow extracts tooltips (FieldNameAlt) and default values (FieldValueDefault). -
API: inputs now support pathlib.Path objects directly.
-
Encryption method now defaults to
encrypt_aes128ifuser_pworowner_pware passed, instead of not encrypting. This is more similar topdftk. -
attach_filesis now an operation, not an output option (pdftk compatibility) -
exit codes better aligned with pdftk's exit codes
-
CLI: stricter argument parsing now raises
DuplicateArgumentErrorif keywords are repeated.
-
catshould now properly handle forms. -
fill_formcompatibility fixes -
dump_data_fields_utf8: fixed crash/output issues. -
set_info: added validation for page label indices and better error handling for rotation/mediabox.
-
automated
pdftkcompatibility testing using third party php test suite. -
drop_xfaoutput option to drop XFA form data (pdftk compatibility) -
renderoperation: rasterize pages -
move,update_info,update_info_utf8now accept instructions from a JSON "at-file" using@filename.jsonin place of CLI arguments -
dump_datagives JSON output via thejsonkeyword -
extensibility: add custom operations by putting Python files in
~/.config/pdftl/operations(*nix) or%APPDATA%\pdftl\config(windows)
-
bug in
add_pages.pywhen a page has an integer key-value -
more comprehensive handling of the five PDF page boxes for
dump_dataandupdate_info -
drop_infoanddrop_xmpoutput options should now work as claimed -
flattenreimplemented for robustness
-
moveoperation: move pages within a PDF file -
placeoperation: shift, scale and/or spin content within the page
- Now handles compound page specifications like
1,3-4,7-end
- Improved API documentation generation
spinoperation. Seeplacefor this functionality.
-
add_textfeatures:-
source metadata variables (
source_filename,source_page, etc) -
Bates stamping variable features, e.g.
DEF-{page+120:06d}produces DEF-000121, DEF-000122, ...
-
-
insertoperation: insert blank pages
- Broken link in README.md
- API with fluent and functional interfaces
docs/api_tutorial.mdand auto-generated API docs
- Renamed operation:
list_filesis nowdump_files
- Fixed bug preventing parsing of the page specification "right"
README.mdcorrected, and "platform" badge added
-
Get
helpby tag withpdftl help tag:<tagname> -
dump_signatures: view and validate PDF signatures -
PDF signature output options:
-
sign_cert <file>Path to certificate PEM -
sign_field <name>Signature field name (default: Signature1) -
sign_key <file>Path to private key PEM -
sign_pass_env <var>Environment variable with sign_cert passphrase -
sign_pass_promptPrompt for sign_cert passphrase
-
-
dump_layers: dump PDF optional content groups (OCGs), a.k.a. "layers"
- performance improvements for
cat
-
crop: addedfitandfit-group -
artwork
-
extended NOTICE.md: acknowledge
pikepdf/qpdfandpypdfium2 -
Windows testing
-
performance improvements (lazy-loaded imports)
-
help tweaks: add sources for non-operations; more help topic aliases
- readthedocs integration and docs generation
- Improved help text
- codecov integration
- PyPI publish integration
- Initial public release of
pdftl. - Operations:
add_textAdd user-specified text strings to PDF pagesbackgroundUse a 1-page PDF as the background for each pageburstSplit a single PDF into individual page filescatConcatenate pages from input PDFs into a new PDFchopChop pages into multiple smaller piecescropCrop pagesdeleteDelete pages from an input PDFdelete_annotsDelete annotation infodump_annotsDump annotation infodump_dataMetadata, page and bookmark info (XML-escaped)dump_data_annotsDump annotation info in pdftk styledump_data_fieldsPrint PDF form field data with XML-style escapingdump_data_fields_utf8Print PDF form field data in UTF-8dump_data_utf8Metadata, page and bookmark info (in UTF-8)dump_destsPrint PDF named destinations data to the consoledump_textPrint PDF text data to the console or a filefill_formFill a PDF formfilterDo nothing. (The default if<operation>omitted.)generate_fdfGenerate an FDF file containing PDF form datainjectInject code at start or end of page content streamslist_filesList file attachmentsmodify_annotsModify properties of existing annotationsmultibackgroundUse multiple pages as backgroundsmultistampStamp multiple pages onto an input PDFnormalizeReformat page content streamsoptimize_imagesOptimize imagesreplaceRegex replacement on page content streamsrotateRotate pages in a PDFshuffleInterleave pages from multiple input PDFsspinSpin page content in a PDFstampStamp a 1-page PDF onto each page of an input PDFunpack_filesUnpack file attachmentsupdate_infoUpdate PDF metadataupdate_info_utf8Update PDF metadata from dump_data_utf8 instructions
- Output options:
allow <perm>...Specify permissions for encrypted filesattach_files <file>... Attach files to the output PDFcompress(default) Compress output file streamsdrop_infoDiscard document-level info metadatadrop_xmpDiscard document-level XMP metadataencrypt_128bitUse 128 bit encryption (obsolete, maybe insecure)encrypt_40bitUse 40 bit encryption (obsolete, highly insecure)encrypt_aes128Use 128 bit AES encryption (maybe obsolete)encrypt_aes256Use 256 bit AES encryptionflattenFlatten all annotationskeep_final_idCopy final input PDF's ID metadata to outputkeep_first_idCopy first input PDF's ID metadata to outputlinearizeLinearize output file(s)need_appearancesSet a form rendering flag in the output PDFoutput <file>The output file path, or a template for 'burst'owner_pw <pw>Set owner password and encrypt outputuncompressDisables compression of output file streamsuser_pw <pw>Set user password and encrypt outputverboseTurn on verbose output