Download Latest Version PdfTK-java-Ext-with-Lib.jar (19.8 MB)
Home / 4.2
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2026-11-26 10.8 kB
PdfTK-java-Ext-with-Lib.jar 2026-11-25 19.8 MB
PdfTK-java-Ext.jar 2026-11-25 1.6 MB
PdfTK-java-Ext-Source.zip 2026-11-25 29.6 MB
Totals: 4 Items   50.9 MB 1
================================================================================
PdfTK java Extended (v4.2)
================================================================================

OVERVIEW
--------
PdfTK java Extended is a powerful, cross-platform command-line utility for
manipulating, automating, and preparing PDF documents for print and digital
workflows. It is built as an extended fork of the pdftk-java project (which
itself is a Java port of the original PDFtk by Sid Steward).

This tool retains full backward compatibility with classic pdftk and pdftk-java
syntax while introducing significant new capabilities focused on prepress
imposition, complex page transformations, variable data injection, automated
bookmarking, and TIFF rasterization. Designed for system administrators,
developers, print professionals, and power users, PdfTK java Extended is
optimized for integration into shell scripts, server-side pipelines, and
automated document assembly workflows without requiring a graphical interface or
proprietary software.

RELEASE FILES
-------------
- PdfTK-java-Ext-with-Lib.jar  Standalone runnable JAR with all required
                               dependencies bundled (recommended for immediate
                               use).
- PdfTK-java-Ext.jar           Lightweight core JAR without bundled third-party
                               libraries (for environments managing dependencies
                               on the classpath).
- PdfTK-java-Ext-Source.zip    Complete source code archive.

KEY FEATURES
------------
PdfTK java Extended includes all features of pdftk-java, plus advanced operations:

1. Prepress & Imposition (impose)
   * Booklet & Codex Imposition (--booklet, --book, --codex): Create print-ready
     booklets and multi-signature codex layouts (V, V-, H, H-) from single-page
     PDFs.
   * N-Up Layout (--n-up / --nup): Arrange multiple logical pages onto a single
     physical sheet (e.g., 2x1, 2x2, 4x2) with alignment, scaling, and
     repeat-to-fill support.
   * Custom Binding & Duplex Controls (--binding, --duplex, --tumble,
     --verso-opposite, --right-to-left): Configure binding edges (TOP, RIGHT,
     BOTTOM, LEFT), two-sided press flip modes, mirrored margins, and
     right-to-left reading order.
   * Sheet Size & Signature Stacks (--sheet-size, --stack): Define custom output
     sheet sizes and control sheets per signature.

2. Page Manipulation & Geometry (transform, scale, blank, reorder)
   * Affine Transformations (transform): Apply precise scaling (-s), rotation in
     radians (-r), resize modes (NONE, FIT, FILL, AUTO), orientation locks
     (--portrait, --landscape), margins, alignment, and page/document
     repetition (--repeat-page, --repeat-doc).
   * Page & Content Scaling (scale): Scale axes independently or uniformly, fit
     or keep as-is (fit | asis), and target exact dimensions (in, mm, pt) or
     percentages across specific page ranges.
   * Conditional Blank Page Insertion (blank): Insert blank pages across all
     sheets, odd/even pages, page ranges, or wherever target text matches
     appear.
   * Page Reordering & Compaction (reorder): Reverse page sequences (--reverse)
     or compact document structures (--compact).

3. Variable Data, Stamping & Forms (vdata, stamp, background, fill_form)
   * Variable Data Printing (vdata): Merge dynamic external data onto PDF
     templates with configurable modes (md <1 | 2>), font sizes (sz), alignment,
     and margins (mg).
   * Opacity- & Rotation-Aware Stamping (stamp, multistamp, background,
     multibackground): Overlay or underlay single- or multi-page watermarks
     with fine control over page ranges (pg), scaling (%, in, mm, pt),
     alignment, rotation, and opacity (op).
   * Form & CSV Workflows (import, fill_form, generate_fdf, generate_xfdf,
     flatten): Import CSV data, populate AcroForms, export FDF/XFDF payloads,
     drop XFA layers (drop_xfa), and flatten interactive fields.

4. Automation, Metadata & Raster Export (bookmark, totiff, wipemeta)
   * Automated Bookmarks (bookmark): Generate PDF outline entries automatically
     across all pages, odd/even pages, intervals (every), page ranges, external
     bookmark files, or target text matches.
   * Smart Bursting (burst): Split documents by page ranges, step intervals
     (every), bookmark levels, or matching text (text).
   * TIFF Raster Export (totiff): Render selected page ranges directly into
     TIFF images with configurable format/short codes, DPI, and compression
     settings.
   * Metadata, Attachments & Security: Inspect/edit UTF-8 metadata
     (update_info_utf8, dump_data_utf8), strip metadata (wipemeta, drop_xmp),
     embed/extract files (attach_files, unpack_files), repair broken PDFs
     (repair), and apply 40-bit, 128-bit, or AES-128 encryption.

SYNOPSIS
--------
pdftk <input PDF files | ->
      [ input_pw <input PDF owner passwords | ..> ]
      [ <operation> ]
      [ output <output filename | - | PROMPT> ]
      [ encrypt_40bit | encrypt_128bit | encrypt_aes128 ]
      [ allow <permissions> ]
      [ owner_pw <owner password> ]
      [ user_pw <user password> ]
      [ flatten ] [ drop_xfa ] [ drop_xmp ] [ need_appearances ]
      [ compress | uncompress ] [ keep_first_id ] [ keep_final_id ]
      [ verbose ] [ replace_font ] [ do_ask ] [ dont_ask ]

Where <operation> may be empty, or:
  cat | shuffle | repair
  | burst [ odd | even | every <n> | bookmark level <n> | text <pattern> ]
  | <rotate>
  | background | multibackground | stamp | multistamp <file>
      [ pg <range> ] [ md <0 | 1 | 2> ] [ % <scale> | <w> <h> ]
      [ <align> ] [ <rotation> ] [ op <opacity> ]
  | vdata <data_file> [ md <1 | 2> ] [ sz <size> ] [ <align> ] [ mg <margin> ]
  | import <csv_file> | fill_form <fdf/xfdf_file>
  | dump_data | dump_data_utf8 | dump_data_fields | dump_data_fields_utf8
  | update_info | update_info_utf8
  | attach_files | unpack_files | generate_fdf | generate_xfdf
  | wipemeta
  | bookmark [ all | even | odd | every <n> | text <pattern> | <range> | <file> ]
  | blank [ <count> ] [ all | even | odd | text <pattern> | <range> ]
  | scale [ <range> ] [ <size> ] [ p | l ] [ fit | asis ]
      [ % <scale> | <w> x <h> ] [ <unit> ] [ <align> ]
  | [ <range> ] totiff [ <dpi> <format> ] [ <compression> ]
  | transform [ -s | --scale <factor> ] [ -r | --rotate | --rotation <rad> ]
      [ --resize <mode> ] [ --page-size | --sheet-size <size> ]
      [ --size <w>x<h> ] [ --landscape | --portrait ] [ --margins <val> ]
      [ --align | --alignment <pos> ] [ --repeat-page <n> ]
      [ --repeat-doc <n> ] [ -o | --output <file> ]
  | impose [ --n-up | --nup <cols>x<rows> ] [ --booklet ] [ --book | --codex <type> ]
      [ --binding <edge> ] [ --sheet-size <size> ] [ --page-size <size> ]
      [ --size <w>x<h> ] [ --pages <range> ] [ --landscape | --portrait ]
      [ --resize <mode> ] [ --margins <val> ] [ --mirror-margins ]
      [ --duplex ] [ --tumble ] [ --two-sided ] [ --verso-opposite ]
      [ --right-to-left ] [ --overlay <file> ] [ --repeat-doc <n> ]
      [ --repeat-page <n> ] [ --repeat-in-layer ] [ --nup-repeat | --repeat-to-fill ]
      [ --stack | --sheets-per-signature <n> ] [ --align | --alignment <pos> ]
      [ -r | --rotate | --rotation <rad> ] [ -s | --scale <factor> ]
      [ -o | --output <file> ]
  | reorder [ --reverse ] [ --compact <n> ] [ -o | --output <file> ]

For Complete Help:
  java -jar PdfTK-java-Ext-with-Lib.jar -help   (also: -h | /?)

Version Check:
  java -jar PdfTK-java-Ext-with-Lib.jar -version   (also: -ver | -v)

GETTING STARTED
---------------
Prerequisites:
  PdfTK java Extended requires Java Runtime Environment (JRE) 8 or higher.

Quick Installation (Zero-Config):
  1. Download PdfTK-java-Ext-with-Lib.jar from the SourceForge Files tab.
  2. Verify from your terminal:
       java -jar PdfTK-java-Ext-with-Lib.jar --version

Optional Command-Line Wrappers (Run as "pdftk ..."):
  Place PdfTK-java-Ext-with-Lib.jar in a folder on your system PATH (e.g.,
  C:\Tools\pdftk on Windows or /usr/local/bin on Linux/macOS) and create one
  of the wrapper scripts below so you can invoke "pdftk" directly.

  * Windows (save as pdftk.bat in the same folder as the JAR):
      @echo off
      java -jar "%~dp0PdfTK-java-Ext-with-Lib.jar" %*

  * Linux / macOS (save as /usr/local/bin/pdftk and run: chmod +x /usr/local/bin/pdftk):
      #!/usr/bin/env bash
      exec java -jar /usr/local/bin/PdfTK-java-Ext-with-Lib.jar "$@"

USAGE EXAMPLES
--------------
Note: If you installed the wrapper script above, you can replace
"java -jar PdfTK-java-Ext-with-Lib.jar" with "pdftk" in every example below.

1. Create a Print-Ready Booklet
   Arrange a document (input.pdf) into a duplex booklet layout on A3 paper with
   left-edge binding:
     java -jar PdfTK-java-Ext-with-Lib.jar input.pdf \
       impose --booklet --binding LEFT --duplex --sheet-size A3 \
       output booklet_output.pdf

2. N-Up Grid Layout (2x2)
   Place four pages of slides.pdf onto each output sheet in a 2x2 grid:
     java -jar PdfTK-java-Ext-with-Lib.jar slides.pdf \
       impose --n-up 2x2 --resize FIT \
       output nup_slides.pdf

3. Variable Data Injection (vdata)
   Inject dynamic text records from records.txt onto template.pdf with custom
   font size and margins:
     java -jar PdfTK-java-Ext-with-Lib.jar template.pdf \
       vdata records.txt sz 12 pt mg 36 \
       output merged_output.pdf

4. Rotate & Scale Pages (transform)
   Rotate pages in doc.pdf by 1.5708 radians (90 degrees) and scale to 80%:
     java -jar PdfTK-java-Ext-with-Lib.jar doc.pdf \
       transform -r 1.5708 -s 0.8 \
       output transformed_doc.pdf

5. Automated Bookmarks by Text
   Add bookmarks wherever "Chapter" appears:
     java -jar PdfTK-java-Ext-with-Lib.jar book.pdf \
       bookmark text "Chapter" \
       output bookmarked.pdf

6. Export Pages to TIFF (totiff)
   Convert pages 1-5 to 300 DPI TIFF images:
     java -jar PdfTK-java-Ext-with-Lib.jar report.pdf \
       1-5 totiff 300 \
       output page_out.tif

7. Classic Merge & Encrypt (cat)
   Merge two PDFs and secure the output with AES-128 encryption:
     java -jar PdfTK-java-Ext-with-Lib.jar part1.pdf part2.pdf \
       cat output combined_secure.pdf \
       encrypt_aes128 owner_pw secret123 allow Printing

LICENSE & LINEAGE
-----------------
This project is free and open-source software licensed under the GNU General
Public License (GPL).
  * PdfTK java Extended is an extended fork adding imposition, transformation,
    variable-data, bookmarking, and rasterization features.
  * Built upon pdftk-java (the Java port of PDFtk).
  * Derived from the original PDFtk (PDF Toolkit).
================================================================================
Source: README.txt, updated 2026-11-26