# pdftk (PDFtk Server and pdftk-java)

> A command-line tool for working with PDFs

Source: https://talira.ai/catalog/pdftk-pdftk-server-and-pdftk-java-gzz4se9m
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [documents / pdf / manipulation](https://talira.ai/categories/documents/pdf/manipulation), [developer tools / cli](https://talira.ai/categories/developer-tools/cli)
- Platforms: cli, linux, macos, windows
- Licence: GPL-2.0-or-later
- Pricing: Free and open source
- Pricing notes: Free under the GPL. PDF Labs sells a one-off $995 commercial redistribution licence for PDFtk Server (unlimited binaries within one commercial product) when you ship it inside software that isn't GPL-compatible.
- Free tier: yes
- Self-hostable: yes
- Backed by: [PDF Labs](https://talira.ai/orgs/pdf-labs.md)
- Creator: Sid Steward, author of PDF Hacks

PDFtk Server is PDF Labs' long-standing command-line PDF toolkit by Sid Steward: merge, split, burst, rotate, encrypt and decrypt, fill AcroForms from FDF/XFDF, flatten forms, stamp and watermark, and read or update metadata and bookmarks. pdftk-java is a Java port of pdftk hosted on [GitLab](https://talira.ai/catalog/gitlab-y85n5jcy.md) that keeps the pdftk command-line tool alive as a separate open-source project. Both are GPL; PDF Labs sells a $995 redistribution licence for shipping PDFtk Server inside non-GPL commercial products.

## Links

- Website: https://www.pdflabs.com/tools/pdftk-server/
- Docs: https://www.pdflabs.com/docs/pdftk-man-page/
- Pricing: https://www.pdflabs.com/tools/pdftk-server/

## Problems it solves

- fill a fillable PDF form from a data file in a shell script
- flatten a filled-in PDF form so the values can't be edited any more
- burst a 200-page PDF into one file per page from the command line
- dump the names of all the form fields in a PDF so I can map my data to them
- glue a cover page onto every generated invoice in a bash loop
- stamp a 'COPY' watermark onto every page of a document on the server
- pull pages 3-7 out of one PDF and interleave them with another
- attach a spreadsheet inside a PDF or extract files embedded in one
- change the title, author and bookmarks of a PDF without opening it in an editor
- remove the password from a PDF I own so other tools can process it
- the old PHP library we use shells out to a PDF tool that no longer installs on the new Ubuntu

## Features

- merge, split, burst and collate pages
- rotate pages
- encrypt output and decrypt password-protected input
- fill forms from FDF/XFDF, flatten forms, generate FDF stencils (dump_data_fields)
- background watermarks and foreground stamps
- report and update metadata and bookmarks
- attach files to pages or the document, unpack attachments
- uncompress and recompress page streams, attempt repair of corrupted PDFs

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.40 out of 1.
Signals: backing 0.50, extensibility 0.20.

- backed by PDF Labs
- created by Sid Steward, author of PDF Hacks

Warnings:

- activity not tracked: no repository is linked

## Alternatives

- [pdfcpu](https://talira.ai/catalog/pdfcpu-ctccs8g5.md): PDF tooling for Go and the command line
- [Apache PDFBox](https://talira.ai/catalog/apache-pdfbox-79k8kxaj.md): The Apache PDFBox library is an open source Java tool for working with PDF documents.
- [qpdf](https://talira.ai/catalog/qpdf-m21640ex.md): A content-preserving PDF document transformer
- [Stirling-PDF](https://talira.ai/catalog/stirling-pdf-3w4rw5w9.md): Your PDFs. Your servers.
- [pdf-lib](https://talira.ai/catalog/pdf-lib-80dtat8x.md): Create and modify PDF documents in any JavaScript environment.
- [PyMuPDF](https://talira.ai/catalog/pymupdf-xw9pb5xf.md): A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
