Add skill pdftk-server

This commit is contained in:
jhauga
2026-02-14 23:54:48 -05:00
parent 75520f3edf
commit 400a2ee3f7
7 changed files with 787 additions and 0 deletions

View File

@@ -0,0 +1,162 @@
---
name: pdftk-server
description: 'Skill for using the command-line tool pdftk (PDFtk Server) for working with PDF files. Use when asked to merge PDFs, split PDFs, rotate pages, encrypt or decrypt PDFs, fill PDF forms, apply watermarks, stamp overlays, extract metadata, burst documents into pages, repair corrupted PDFs, attach or extract files, or perform any PDF manipulation from the command line.'
---
# 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**: Download and run the installer (see `references/download.md`)
- **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
```bash
pdftk file1.pdf file2.pdf cat output merged.pdf
```
Using handles for more control:
```bash
pdftk A=file1.pdf B=file2.pdf cat A B output merged.pdf
```
### Split a PDF into Individual Pages
```bash
pdftk input.pdf burst
```
### Extract Specific Pages
Extract pages 1-5 and 10-15:
```bash
pdftk input.pdf cat 1-5 10-15 output extracted.pdf
```
### Remove Specific Pages
Remove page 13:
```bash
pdftk input.pdf cat 1-12 14-end output output.pdf
```
### Rotate Pages
Rotate all pages 90 degrees clockwise:
```bash
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):
```bash
pdftk input.pdf output secured.pdf owner_pw mypassword user_pw userpass
```
### Decrypt a PDF
Remove encryption using the known password:
```bash
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:
```bash
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):
```bash
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:
```bash
pdftk input.pdf stamp overlay.pdf output stamped.pdf
```
### Extract Metadata
Export bookmarks, page metrics, and document information:
```bash
pdftk input.pdf dump_data output metadata.txt
```
### Repair a Corrupted PDF
Pass a broken PDF through pdftk to attempt automatic repair:
```bash
pdftk broken.pdf output fixed.pdf
```
### Collate Scanned Pages
Interleave separately scanned even and odd pages:
```bash
pdftk A=even.pdf B=odd.pdf shuffle A B output collated.pdf
```
## Troubleshooting
| Issue | Solution |
|-------|----------|
| `pdftk` command not found | Verify installation; check that pdftk is in your system PATH |
| Cannot decrypt PDF | Ensure you are providing the correct owner or user password via `input_pw` |
| Output file is empty or corrupt | Check input file integrity; try running `pdftk input.pdf output repaired.pdf` first |
| Form fields not visible after fill | Use the `flatten` flag to merge fields into the page content |
| Watermark not appearing | Ensure the input PDF has transparent regions; use `stamp` for opaque overlays |
| Permission denied errors | Check file permissions on input and output paths |
## References
Bundled reference documents in the `references/` folder:
- [pdftk-man-page.md](references/pdftk-man-page.md) - Complete manual reference with all operations, options, and syntax
- [pdftk-cli-examples.md](references/pdftk-cli-examples.md) - Practical command-line examples for common tasks
- [download.md](references/download.md) - Installation and download instructions for all platforms
- [pdftk-server-license.md](references/pdftk-server-license.md) - PDFtk Server licensing information
- [third-party-materials.md](references/third-party-materials.md) - Third-party library licenses

View File

@@ -0,0 +1,75 @@
# Download
PDFtk provides an installer for Windows. Many Linux distributions provide a PDFtk package you can download and install using their package manager.
## Microsoft Windows
Download the PDFtk Server installer for Windows 10 and 11 using the following command:
```bash
curl -LO https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-win-setup.exe
```
Then run the installer:
```bash
.\pdftk_server-2.02-win-setup.exe
```
After installation, open a command prompt, type `pdftk` and press Enter. PDFtk will respond by displaying brief usage information.
## Linux
On Debian/Ubuntu-based distributions:
```bash
sudo apt-get install pdftk
```
On Red Hat/Fedora-based distributions:
```bash
sudo dnf install pdftk
```
## PDFtk Server GPL License
PDFtk Server (pdftk) is not public domain software. It can be installed and used at no charge under its [GNU General Public License (GPL) Version 2](https://www.pdflabs.com/docs/pdftk-license/gnu_general_public_license_2.txt). PDFtk uses third-party libraries. The [licenses and source code for these libraries are described here](https://www.pdflabs.com/docs/pdftk-license/) under Third-Party Materials.
## PDFtk Server Redistribution License
If you plan to distribute PDFtk Server as part of your own software, you will need a PDFtk Server Redistribution License. The exception to this rule is if your software is licensed to the public under the GPL or another compatible license.
The commercial redistribution license allows you, subject to the terms of the license, to distribute an unlimited number of PDFtk Server binaries as part of one distinct commercial product. Please read the full license:
[PDFtk Server Redistribution License (PDF)](https://pdflabs.onfastspring.com/pdftk-server)
Now available for $995:
[Buy the PDFtk Server Redistribution License](https://pdflabs.onfastspring.com/pdftk-server)
## Build PDFtk Server from Source
PDFtk Server can be compiled from its source code. PDFtk Server is known to compile and run on [Debian](https://packages.debian.org/search?keywords=pdftk), [Ubuntu Linux](https://packages.ubuntu.com/search?keywords=pdftk), [FreeBSD](https://www.freshports.org/print/pdftk/), Slackware Linux, SuSE, Solaris and [HP-UX](http://hpux.connect.org.uk/hppd/hpux/Text/pdftk-1.45/).
Download and unpack the source:
```bash
curl -LO https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-src.zip
unzip pdftk-2.02-src.zip
```
Review the [pdftk license information](https://www.pdflabs.com/docs/pdftk-license/) in: `license_gpl_pdftk/readme.txt`.
Review the Makefile provided for your platform and confirm that `TOOLPATH` and `VERSUFF` suit your installation of gcc/gcj/libgcj. If you run `apropos gcc` and it returns something like `gcc-4.5`, then set `VERSUFF` to `-4.5`. The `TOOLPATH` probably does not need to be set.
Change into the `pdftk` sub-directory and run:
```bash
cd pdftk
make -f Makefile.Debian
```
Substitute your platform's Makefile filename as needed.
PDFtk has been built using gcc/gcj/libgcj versions 3.4.5, 4.4.1, 4.5.0, and 4.6.3. PDFtk 1.4x fails to build on gcc 3.3.5 due to missing libgcj features. If you are using gcc 3.3 or older, try building [pdftk 1.12](https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.12.tar.gz) instead.

View File

@@ -0,0 +1,193 @@
# PDFtk CLI Examples
PDFtk is a command-line program. Use your computer terminal or command prompt when running these examples.
## Collate Scanned Pages
Interleave even and odd scanned pages into a single document:
```bash
pdftk A=even.pdf B=odd.pdf shuffle A B output collated.pdf
```
If the odd pages are in reverse order:
```bash
pdftk A=even.pdf B=odd.pdf shuffle A Bend-1 output collated.pdf
```
## Decrypt a PDF
Remove encryption from a PDF using its password:
```bash
pdftk secured.pdf input_pw foopass output unsecured.pdf
```
## Encrypt a PDF Using 128-Bit Strength
Apply owner password encryption:
```bash
pdftk 1.pdf output 1.128.pdf owner_pw foopass
```
Require a password to open the PDF as well:
```bash
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz
```
Encrypt while still allowing printing:
```bash
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz allow printing
```
## Join PDFs
Merge multiple PDFs into one:
```bash
pdftk in1.pdf in2.pdf cat output out1.pdf
```
Using handles for explicit control:
```bash
pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf
```
Using wildcards to merge all PDFs in a directory:
```bash
pdftk *.pdf cat output combined.pdf
```
## Remove Specific Pages
Exclude page 13 from a document:
```bash
pdftk in.pdf cat 1-12 14-end output out1.pdf
```
Using a handle:
```bash
pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf
```
## Apply 40-Bit Encryption
Merge and encrypt with 40-bit strength:
```bash
pdftk 1.pdf 2.pdf cat output 3.pdf encrypt_40bit owner_pw foopass
```
## Join Files When One Is Password-Protected
Supply the password for the encrypted input:
```bash
pdftk A=secured.pdf 2.pdf input_pw A=foopass cat output 3.pdf
```
## Uncompress PDF Page Streams
Decompress internal streams for inspection or debugging:
```bash
pdftk doc.pdf output doc.unc.pdf uncompress
```
## Repair Corrupted PDFs
Pass a broken PDF through pdftk to attempt repair:
```bash
pdftk broken.pdf output fixed.pdf
```
## Burst a PDF into Individual Pages
Split each page into its own file:
```bash
pdftk in.pdf burst
```
Burst with encryption and limited printing:
```bash
pdftk in.pdf burst owner_pw foopass allow DegradedPrinting
```
## Generate a PDF Metadata Report
Export bookmarks, metadata, and page metrics:
```bash
pdftk in.pdf dump_data output report.txt
```
## Rotate Pages
Rotate the first page 90 degrees clockwise:
```bash
pdftk in.pdf cat 1east 2-end output out.pdf
```
Rotate all pages 180 degrees:
```bash
pdftk in.pdf cat 1-endsouth output out.pdf
```
## Fill a PDF Form from Data
Populate form fields from an FDF file:
```bash
pdftk form.pdf fill_form data.fdf output filled_form.pdf
```
Flatten the form after filling (prevents further editing):
```bash
pdftk form.pdf fill_form data.fdf output filled_form.pdf flatten
```
## Apply a Background Watermark
Stamp a watermark behind every page:
```bash
pdftk input.pdf background watermark.pdf output watermarked.pdf
```
## Stamp an Overlay on Top
Apply an overlay PDF on top of every page:
```bash
pdftk input.pdf stamp overlay.pdf output stamped.pdf
```
## Attach Files to a PDF
Embed files as attachments:
```bash
pdftk input.pdf attach_files table.html graph.png output output.pdf
```
## Extract Attachments from a PDF
Unpack all embedded files:
```bash
pdftk input.pdf unpack_files output /path/to/output/
```

View File

@@ -0,0 +1,228 @@
# PDFtk Server Manual Reference
## Overview
PDFtk is a command-line utility for manipulating PDF documents. It enables operations including merging, splitting, rotating, encrypting, decrypting, watermarking, form-filling, and metadata extraction of PDF files.
## Synopsis
```
pdftk [input PDF files | - | PROMPT]
[input_pw <passwords>]
[<operation>] [<operation arguments>]
[output <filename | - | PROMPT>]
[encrypt_40bit | encrypt_128bit]
[allow <permissions>]
[owner_pw <password>] [user_pw <password>]
[compress | uncompress]
[flatten] [need_appearances]
[verbose] [dont_ask | do_ask]
```
## Input Options
**Input PDF Files**: Specify one or more PDFs. Use `-` for stdin or `PROMPT` for interactive input. Files may be assigned handles (single uppercase letters) for reference in operations:
```
pdftk A=file1.pdf B=file2.pdf cat A B output merged.pdf
```
**Input Passwords** (`input_pw`): For encrypted PDFs, provide owner or user passwords associated with file handles or by input order:
```
pdftk A=secured.pdf input_pw A=foopass cat output unsecured.pdf
```
## Core Operations
### cat - Concatenate and Compose
Merge, split, or reorder pages with optional rotation. Supports page ranges, reverse ordering (prefix `r`), page qualifiers (`even`/`odd`), and rotation (compass directions `north`, `south`, `east`, `west`, `left`, `right`, `down`).
Page range syntax: `[handle][begin[-end[qualifier]]][rotation]`
```
pdftk A=in1.pdf B=in2.pdf cat A1-7 B1-5 A8 output combined.pdf
```
### shuffle - Collate Pages
Takes one page from each input range in turn, producing an interleaved result. Useful for collating separately scanned odd and even pages.
```
pdftk A=even.pdf B=odd.pdf shuffle A B output collated.pdf
```
### burst - Split into Individual Pages
Splits a single PDF into one file per page. Output files are named using `printf`-style formatting (default: `pg_%04d.pdf`).
```
pdftk input.pdf burst output page_%02d.pdf
```
### rotate - Rotate Pages
Rotates specified pages while maintaining document order. Uses the same page range syntax as `cat`.
```
pdftk in.pdf cat 1-endeast output rotated.pdf
```
### generate_fdf - Extract Form Data
Creates an FDF file from a PDF form, capturing current field values.
```
pdftk form.pdf generate_fdf output form_data.fdf
```
### fill_form - Populate Form Fields
Fills PDF form fields from an FDF or XFDF data file.
```
pdftk form.pdf fill_form data.fdf output filled.pdf flatten
```
### background - Apply Watermark Behind Content
Applies a single-page PDF as a background (watermark) behind every page of the input. The input PDF should have a transparent background for best results.
```
pdftk input.pdf background watermark.pdf output watermarked.pdf
```
### multibackground - Apply Multi-Page Watermark
Like `background`, but applies corresponding pages from the background PDF to matching pages in the input.
```
pdftk input.pdf multibackground watermarks.pdf output watermarked.pdf
```
### stamp - Overlay on Top of Content
Stamps a single-page PDF on top of every page of the input. Use this instead of `background` when the overlay PDF is opaque or has no transparency.
```
pdftk input.pdf stamp overlay.pdf output stamped.pdf
```
### multistamp - Multi-Page Overlay
Like `stamp`, but applies corresponding pages from the stamp PDF to matching pages in the input.
```
pdftk input.pdf multistamp overlays.pdf output stamped.pdf
```
### dump_data - Export Metadata
Outputs PDF metadata, bookmarks, and page metrics to a text file.
```
pdftk input.pdf dump_data output metadata.txt
```
### dump_data_utf8 - Export Metadata (UTF-8)
Same as `dump_data`, but outputs UTF-8 encoded text.
```
pdftk input.pdf dump_data_utf8 output metadata_utf8.txt
```
### dump_data_fields - Extract Form Field Info
Reports form field information including type, name, and values.
```
pdftk form.pdf dump_data_fields output fields.txt
```
### dump_data_fields_utf8 - Extract Form Field Info (UTF-8)
Same as `dump_data_fields`, but outputs UTF-8 encoded text.
### dump_data_annots - Extract Annotations
Reports PDF annotation information.
```
pdftk input.pdf dump_data_annots output annots.txt
```
### update_info - Modify Metadata
Updates PDF metadata and bookmarks from a text file (same format as `dump_data` output).
```
pdftk input.pdf update_info metadata.txt output updated.pdf
```
### update_info_utf8 - Modify Metadata (UTF-8)
Same as `update_info`, but expects UTF-8 encoded input.
### attach_files - Embed Files
Attaches files to a PDF, optionally at a specific page.
```
pdftk input.pdf attach_files table.html graph.png to_page 6 output output.pdf
```
### unpack_files - Extract Attachments
Extracts file attachments from a PDF.
```
pdftk input.pdf unpack_files output /path/to/output/
```
## Output Options
| Option | Description |
|--------|-------------|
| `output <filename>` | Specify output file. Use `-` for stdout or `PROMPT` for interactive. |
| `encrypt_40bit` | Apply 40-bit RC4 encryption |
| `encrypt_128bit` | Apply 128-bit RC4 encryption (default when password set) |
| `owner_pw <password>` | Set the owner password |
| `user_pw <password>` | Set the user password |
| `allow <permissions>` | Grant specific permissions (see below) |
| `compress` | Compress page streams |
| `uncompress` | Decompress page streams (useful for debugging) |
| `flatten` | Flatten form fields into page content |
| `need_appearances` | Signal viewer to regenerate field appearances |
| `keep_first_id` | Preserve document ID from first input |
| `keep_final_id` | Preserve document ID from last input |
| `drop_xfa` | Remove XFA form data |
| `verbose` | Enable detailed operation output |
| `dont_ask` | Suppress interactive prompts |
| `do_ask` | Enable interactive prompts |
## Permissions
Use with the `allow` keyword when encrypting. Available permissions:
| Permission | Description |
|------------|-------------|
| `Printing` | Allow high-quality printing |
| `DegradedPrinting` | Allow low-quality printing |
| `ModifyContents` | Allow content modification |
| `Assembly` | Allow document assembly |
| `CopyContents` | Allow content copying |
| `ScreenReaders` | Allow screen reader access |
| `ModifyAnnotations` | Allow annotation modification |
| `FillIn` | Allow form fill-in |
| `AllFeatures` | Grant all permissions |
## Key Notes
- Page numbers are one-based; use the `end` keyword for the final page
- Handles are optional when working with a single PDF
- Filter mode (no operation specified) applies output options without restructuring
- Reverse page references use the `r` prefix (e.g., `r1` = last page, `r2` = second-to-last)
- The `background` operation requires a transparent input; use `stamp` for opaque overlay PDFs
- Output filename cannot match any input filename

View File

@@ -0,0 +1,25 @@
# PDFtk Server License
PDFtk Server can be used at no charge under its GPL license.
Commercial users will benefit from the comprehensive commercial support agreement.
To distribute PDFtk Server as part of your own commercial product you will need to purchase the PDFtk Server Redistribution License.
## PDFtk Server Redistribution License
If you plan to distribute PDFtk Server as part of your own software, you will need a PDFtk Server Redistribution License. The exception to this rule is if your software is licensed to the public under the GPL or another compatible license.
The commercial redistribution license allows you, subject to the terms of the license, to distribute an unlimited number of PDFtk Server binaries as part of one distinct commercial product. Please read the full license:
[PDFtk Server Redistribution License (PDF)](https://www.pdflabs.com/docs/pdftk-license/pdf_labs_pdftk_redist_lic_agreement_ver_2.0.pdf)
Now available for $995:
[Buy the PDFtk Server Redistribution License](https://pdflabs.onfastspring.com/pdftk-server)
## PDFtk Server GPL License
PDFtk Server (pdftk) is not public domain software. It can be used at no charge under its GNU General Public License (GPL) Version 2. [Click here to read the complete text](https://www.pdflabs.com/docs/pdftk-license/gnu_general_public_license_2.txt).
PDFtk uses third-party libraries. The licenses and source code for these libraries are described in the third-party-materials reference document.

View File

@@ -0,0 +1,103 @@
# Third-Party Materials
PDFtk Server (pdftk) uses third-party libraries. Depending on the target operating system, some of these are linked or distributed with pdftk. These are their licensing terms.
## GCC libgcj
The libgcj library is licensed under the terms of the GNU General Public License.
Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.
As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
[Click to read the GNU General Public License Version 2.](https://www.pdflabs.com/docs/pdftk-license/gnu_general_public_license_2.txt)
Libgcj is part of GCC, so you can find its source code in the GCC [source code](https://gcc.gnu.org/gcc-4.5/).
## GCC libgcc and libstdc++
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation.
[Click to read the GNU General Public License Version 3](https://www.pdflabs.com/docs/pdftk-license/gnu_general_public_license_3.0.txt).
[Click to read the GCC Runtime Library Exception Version 3.1](https://www.pdflabs.com/docs/pdftk-license/gcc_runtime_library_exception_3.1.txt).
Libgcc and libstdc++ are part of GCC, so you can find their source code in the GCC [source code](https://gcc.gnu.org/gcc-4.5/).
## GNU Classpath
GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.
As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
[Click to read the GNU General Public License Version 2](https://www.pdflabs.com/docs/pdftk-license/gnu_general_public_license_2.txt).
Classpath is part of GCC, so you can find its source code in the [GCC source code](https://gcc.gnu.org/gcc-4.5/).
## Bouncy Castle
The Bouncy Castle License
Copyright (c) 2000-2008 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Download the Bouncy Castle source code from: http://www.bouncycastle.org/.
## iText (itext-paulo)
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
[Click to read the GNU Library General Public License Version 2](https://www.pdflabs.com/docs/pdftk-license/gnu_lgpl_license_2.txt).
The iText source code used in pdftk is slightly modified from its original version. This modified version is included with the [pdftk source code](https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/).
## MinGW Runtimes (Windows Only)
MinGW runtime: The MinGW base runtime package has been placed in the public domain, and is not governed by copyright. This basically means that you can do what you like with the code.
w32api: You are free to use, modify and copy this package. No restrictions are imposed on programs or object files linked with this library. You may not restrict the the usage of this library. You may distribute this library as part of another package or as a modified package if, and only if, you do not restrict the usage of the portions consisting of this (optionally modified) library. If distributed as a modified package, then a copy of this notice must be included.
This library is distributed in the hope that it will be useful, but WITHOUT WARRANTY OF ANY KIND; without even the implied warranties of MERCHANTABILITY or of FITNESS FOR A PARTICULAR PURPOSE.
Download the MinGW runtime source code from: http://mingw.org/.
## Libiconv
The GNU LIBICONV Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
The GNU LIBICONV Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
[Click to read the GNU Library General Public License](https://www.pdflabs.com/docs/pdftk-license/gnu_lgpl_license_2.txt).
Download the libiconv source code from: http://www.gnu.org/software/libiconv/
## Apache Batik
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
[Click to read the Apache License Version 2.0](https://www.pdflabs.com/docs/pdftk-license/apache_license_2.txt).
[Click to read the Apache Batik NOTICE file](https://www.pdflabs.com/docs/pdftk-license/apache_batik_NOTICE.txt).
Download the Apache Batik source code from: http://xmlgraphics.apache.org/batik/.