Pdftk is a simple command line tool for doing everyday things with PDF documents. Use it to merge PDF documents, split PDF pages into a new document, decrypt input as necessary (password required), encrypt output as desired, fill PDF forms with FDF data and/or flatten forms, apply a background watermark, report on PDF metrics, update PDF metadata, attach files to PDF pages or the PDF document, unpack PDF attachments, burst a PDF document into single pages, decompress and re-compress page streams, and repair corrupted PDF files (where possible).
| Tags | Text Processing |
|---|---|
| Licenses | GPL |
| Operating Systems | Mac OS X Windows Windows POSIX Linux BSD FreeBSD Solaris |
| Implementation | C++ |
Recent releases


Changes: A bug with creation of bloated PDFs from input PDF pages with links was fixed. The drop_xfa option was dropped to be able to fill forms created with newer versions of Acrobat or Adobe Designer. The stamp operation was added. Support for XFDF was added to the form_fill operation.


Changes: A bug where the presence of page annotations in some PDFs would cause pdftk to crash was fixed. This bug first emerged when processing a PDF created by FPDF (version 1.52) that contained Web links. A couple of bugs in the dump_data_fields form field reporting were fixed. This feature was also improved so it now reports all possible settings for check box, radio button, list box, and combo box form fields.


Changes: The watermarking feature was fixed so that it handles rotated pages (input PDF or background PDF) better. The form field handling when combining PDF pages was fixed. Pdftk now detects duplicate field names and adds name prefixes as needed. stdin support was added for input PDF, FDF, or Info files. A means for users to control the output PDF filenames when using the burst feature was added. The background command-line syntax was changed so that it is an operation instead of an output option. The subset font name prefixes for input PDFs are now shuffled to prevent duplicates.


No changes have been submitted for this release.
GSM mobile manager for various cellular phones (Nokia, Siemens, Alcatel, others)
- All comments
Recent commentsSid,
Really a big fan of your solution and appreciate what you've done for PDF processing in the PHP realm. One of the strongest advantages I've seen in this solution is that it handles form fields appropriately versus disabling them. One thing I noticed was that the 1.10 change fixed the issue of merging PDFs and having "duplicate" fields, however I am using Adobe Acrobat 9 to do so and therefore assume it's a legitimate case. If this is a legitimate case, would you be able to add a command line argument that allows for disabling the renaming feature? I am desperately in need of a build that allows for echoing a field through merged pages.
Again - great job with this and really hope you're able to support this amazing tool!
Re: very useful
> This tool certiainly does one thing very
> well but it strays from the Unix
> philosophy by having a very non-standard
> command-line interface.
True. I find the interface curiously similar to (though not quite as complex and confusing as) that of sox, the audio "Swiss army knife".
Re: very useful
> This is a wonderful, useful tool that
> follows the Unix philosophy of doing one
> thing, and doing it well. It's given me
> solutions to a lot of problems I had
> with manipulating pdfs. Good job!
This tool certiainly does one thing very well but it strays from the Unix philosophy by having a very non-standard command-line interface.
very useful
This is a wonderful, useful tool that follows the Unix philosophy of doing one thing, and doing it well. It's given me solutions to a lot of problems I had with manipulating pdfs. Good job!