P
pdftk CLI Builder
Interactive PDF toolkit command generator for Linux & Unix terminals
sys:pdftk-java v2.02
lang:bash
ops:25 commands
env:linux-gnu
mod:encrypt · merge · split · forms
status:ready
BUILD v2.02
Ctrl+K search
pdftk │ bash — interactive command builder
GNU/Linux
Generated Command
$
Merge & Collate
Join multiple PDFs or interleave scanned page scans into one document (citation:3)(citation:7)
Split & Burst
Extract page ranges or burst a PDF into individual single-page files (citation:3)(citation:7)
Rotate Pages
Rotate individual pages or entire documents by 90, 180, or 270 degrees (citation:3)(citation:7)
🔒
Encrypt & Decrypt
40-bit and 128-bit RC4 encryption with owner/user passwords and granular permissions (citation:7)
📝
Fill PDF Forms
Populate form fields with FDF/XFDF data and flatten interactive forms (citation:3)
💧
Watermark & Stamp
Apply background watermarks or foreground stamps to every page (citation:3)(citation:7)
📊
Metadata & Bookmarks
Report, add, or update PDF metadata, bookmarks, and document info (citation:3)
📎
File Attachments
Embed file attachments into a PDF or unpack existing attachments (citation:3)
🔧
Repair & Compress
Fix corrupted XREF tables, uncompress/recompress page streams for editing (citation:3)(citation:7)
📋
Generate FDF Stencils
Extract form field definitions into FDF data stencils from any PDF form (citation:3)
Debian / Ubuntu
Install the modern pdftk-java package directly from the official repositories. Requires Java JRE which will be pulled in automatically (citation:6)(citation:11).
$sudo apt install pdftk-java
Also available: sudo apt install pdftk on older releases. Ubuntu 22.04+ ships pdftk-java (citation:6).
RHEL / CentOS / Rocky
On RHEL 8+ and Rocky Linux, pdftk-java is available in EPEL repositories. For CentOS 7, a community RPM bundles the required libgcj library (citation:9)(citation:10).
$sudo dnf install pdftk-java
CentOS 7 fallback: sudo yum localinstall https://www.linuxglobal.com/static/blog/pdftk-2.02-1.el7.x86_64.rpm (citation:9)
Fedora 33+
Fedora 33 and later include pdftk-java in the default repositories (citation:11).
$sudo dnf install pdftk-java
Arch Linux
Available from the Arch User Repository (AUR) (citation:11).
$yay -S pdftk-java
openSUSE
Install via zypper package manager (citation:11).
$sudo zypper install pdftk-java
macOS (Homebrew)
Install via Homebrew on macOS.
$brew install pdftk-java
Windows
Download the official PDFtk Server installer for Windows 10/11 from pdflabs.com (citation:3)(citation:4).
> Download from pdflabs.com
After install, open cmd and type pdftk to verify. Includes PDFtk Free GUI (citation:4).
Universal (Native Binary)
Download a standalone native-image binary — no Java runtime needed. Works on any x86_64 Linux system (citation:10).
$ wget https://gitlab.com/pdftk-java/pdftk/-/jobs/.../pdftk $ chmod +x pdftk
Check gitlab.com/pdftk-java/pdftk for latest build artifacts (citation:10).
Build from Source
Compile pdftk from source using gcc/gcj. Supports Debian, Ubuntu, FreeBSD, Slackware, SuSE, Solaris, HP-UX (citation:3).
$ unzip pdftk-2.02-src.zip $ cd pdftk $ make -f Makefile.Debian
Requires gcc/gcj 3.4.5+. Review the Makefile for your platform and confirm TOOLPATH and VERSUFF (citation:3).
Ready
Operation: none selected
0 chars
UTF-8
LF