Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
github avatar

Pdftk Server

  • 9.9k installs
  • 37.1k repo stars
  • Updated July 28, 2026
  • github/awesome-copilot

PDFtk Server is a CLI tool that automates PDF document operations including merge, split, encryption, form-filling, watermarking, and metadata extraction.

About

PDFtk Server is a command-line tool for programmatic PDF manipulation. Developers use it to automate PDF workflows: merging/splitting documents, encrypting/decrypting, filling forms, applying watermarks, extracting metadata, repairing corrupted files, and collating scanned pages. Key operations include cat (merge/extract), burst (split), stamp/background (overlays), fill_form (form population), and dump_data (metadata extraction). Supports 128-bit encryption, FDF form data, and page rotation. Installation available via package managers (brew, apt, dnf, winget) across macOS, Linux, and Windows.

  • Merge multiple PDFs or extract specific page ranges with single commands
  • Encrypt/decrypt PDFs with owner and user passwords at 128-bit encryption
  • Fill PDF form fields from FDF/XFDF data and flatten to prevent editing
  • Apply watermarks (background) and stamps (overlay) to every page
  • Extract metadata, bookmarks, and page metrics; repair corrupted PDFs

Pdftk Server by the numbers

  • 9,867 all-time installs (skills.sh)
  • +36 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #30 of 560 CLI & Terminal skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

pdftk-server capabilities & compatibility

Capabilities
merge and concatenate pdf files · split and burst pdfs into pages · encrypt and decrypt with passwords · fill and flatten pdf forms · apply watermarks and overlays · extract metadata and bookmarks · repair corrupted pdfs
Works with
github
Use cases
api development · data analysis
Platforms
macOS · Windows · Linux · WSL
Runs
Runs locally
Pricing
Free
From the docs

What pdftk-server says it does

Merging or joining multiple PDF files into one
skill/pdftk-server/README.md#When to Use This Skill
Encrypting or decrypting PDF files
skill/pdftk-server/README.md#When to Use This Skill
Filling PDF form fields from FDF/XFDF data
skill/pdftk-server/README.md#When to Use This Skill
pdftk file1.pdf file2.pdf cat output merged.pdf
skill/pdftk-server/README.md#Merge Multiple PDFs
npx skills add https://github.com/github/awesome-copilot --skill pdftk-server

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs9.9k
repo stars37.1k
Security audit1 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorygithub/awesome-copilot

What it does

Merge, split, encrypt, decrypt, watermark, and manipulate PDF files from the command line.

Who is it for?

Backend automation, document processing pipelines, batch PDF manipulation, form population systems, PDF encryption workflows.

Skip if: Interactive PDF editing, GUI-based document design, real-time collaborative editing, complex PDF layout analysis.

When should I use this skill?

Need to merge/split PDFs, encrypt documents, fill forms programmatically, apply watermarks, extract metadata, or repair corrupted PDFs.

What you get

Automated PDF processing workflows that merge documents, secure sensitive PDFs, populate forms, apply branding, and repair corrupted files.

  • Merged or split PDF files
  • Encrypted/decrypted PDF documents
  • Filled and flattened PDF forms

By the numbers

  • Supports 128-bit encryption for PDF security
  • Can burst a PDF into individual pages in one operation
  • Handles multiple input files and handles in a single command

Files

SKILL.mdMarkdownGitHub ↗

PDFtk Server

PDFtk Server is a command-line tool for working with PDF documents. It can merge, split, rotate, encrypt, decrypt, watermark, stamp, fill forms, extract metadata, and manipulate PDFs in a variety of ways.

When to Use This Skill

  • Merging or joining multiple PDF files into one
  • Splitting or bursting a PDF into individual pages
  • Rotating PDF pages
  • Encrypting or decrypting PDF files
  • Filling PDF form fields from FDF/XFDF data
  • Applying background watermarks or foreground stamps
  • Extracting PDF metadata, bookmarks, or form field information
  • Repairing corrupted PDF files
  • Attaching or extracting files embedded in PDFs
  • Removing specific pages from a PDF
  • Collating separately scanned even/odd pages
  • Compressing or decompressing PDF page streams

Prerequisites

  • PDFtk Server must be installed on the system
  • Windows: winget install --id PDFLabs.PDFtk.Server
  • macOS: brew install pdftk-java
  • Linux (Debian/Ubuntu): sudo apt-get install pdftk
  • Linux (Red Hat/Fedora): sudo dnf install pdftk
  • Access to a terminal or command prompt
  • Verify installation by running pdftk --version

Step-by-Step Workflows

Merge Multiple PDFs

pdftk file1.pdf file2.pdf cat output merged.pdf

Using handles for more control:

pdftk A=file1.pdf B=file2.pdf cat A B output merged.pdf

Split a PDF into Individual Pages

pdftk input.pdf burst

Extract Specific Pages

Extract pages 1-5 and 10-15:

pdftk input.pdf cat 1-5 10-15 output extracted.pdf

Remove Specific Pages

Remove page 13:

pdftk input.pdf cat 1-12 14-end output output.pdf

Rotate Pages

Rotate all pages 90 degrees clockwise:

pdftk input.pdf cat 1-endeast output rotated.pdf

Encrypt a PDF

Set an owner password and a user password with 128-bit encryption (default):

pdftk input.pdf output secured.pdf owner_pw mypassword user_pw userpass

Decrypt a PDF

Remove encryption using the known password:

pdftk secured.pdf input_pw mypassword output unsecured.pdf

Fill a PDF Form

Populate form fields from an FDF file and flatten to prevent further edits:

pdftk form.pdf fill_form data.fdf output filled.pdf flatten

Apply a Background Watermark

Place a single-page PDF behind every page of the input (input should have transparency):

pdftk input.pdf background watermark.pdf output watermarked.pdf

Stamp an Overlay

Place a single-page PDF on top of every page of the input:

pdftk input.pdf stamp overlay.pdf output stamped.pdf

Extract Metadata

Export bookmarks, page metrics, and document information:

pdftk input.pdf dump_data output metadata.txt

Repair a Corrupted PDF

Pass a broken PDF through pdftk to attempt automatic repair:

pdftk broken.pdf output fixed.pdf

Collate Scanned Pages

Interleave separately scanned even and odd pages:

pdftk A=even.pdf B=odd.pdf shuffle A B output collated.pdf

Troubleshooting

IssueSolution
pdftk command not foundVerify installation; check that pdftk is in your system PATH
Cannot decrypt PDFEnsure you are providing the correct owner or user password via input_pw
Output file is empty or corruptCheck input file integrity; try running pdftk input.pdf output repaired.pdf first
Form fields not visible after fillUse the flatten flag to merge fields into the page content
Watermark not appearingEnsure the input PDF has transparent regions; use stamp for opaque overlays
Permission denied errorsCheck file permissions on input and output paths

References

Bundled reference documents in the references/ folder:

  • pdftk-man-page.md - Complete manual reference with all operations, options, and syntax
  • pdftk-cli-examples.md - Practical command-line examples for common tasks
  • download.md - Installation and download instructions for all platforms
  • pdftk-server-license.md - PDFtk Server licensing information
  • third-party-materials.md - Third-party library licenses

Related skills

How it compares

Use pdftk-server for fast local PDF CLI operations when a coding agent needs merge or split without a document SaaS API.

FAQ

How do I merge multiple PDFs?

Use `pdftk file1.pdf file2.pdf cat output merged.pdf` or with handles: `pdftk A=file1.pdf B=file2.pdf cat A B output merged.pdf`

How do I encrypt a PDF with a password?

Use `pdftk input.pdf output secured.pdf owner_pw mypassword user_pw userpass` for 128-bit encryption with owner and user passwords.

How do I fill PDF form fields programmatically?

Populate an FDF file with field data, then run `pdftk form.pdf fill_form data.fdf output filled.pdf flatten` to merge fields into page content.

Is Pdftk Server safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

CLI & Terminalbackenddevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.