Latest update:

About PDF Chain

PDF Chain is a graphical user interface for the PDF Toolkit (PDFtk), a very useful command line program for manipulating PDF files. It has many features and options described and explained at its man page. PDF Chain wants to offer all these features at a useful and intuitive graphical user interface to everyone.

If you start PDF Chain at a terminal it will show you the working PDFtk command. In this way PDF Chain can help you to work with the PDFtk.

  • $ pdfchain

The Window

The titles of the most window elements are similar to the commands of PDFtk. PDFtk users will be right at home.

PDF Chain has five sections, organized into notebook tabs.

  • Catenate
  • Burst
  • Background / Stamp
  • Attachment
  • Tools

Every section, without the Tools, can be used in combination with the Permissions.

Select the tab of your choice and organize the files and options in it. In the end of a session you have to press the Save As button to select the output file name or folder. If basic data are missing, no file selector will appear! The selected tab has elementary effect on the Save As button. The Permissions are optional, but selected permissions have always effect on saving output PDF files, also if the permissions aren't visible.

PDF Chain creates a PDFtk command and executes it (using the "system()" function). The PDFtk command is also displayed in the terminal from where PDF Chain was started from. Some errors can't be obviated and handled in foresight. Execution errors returned from PDFtk will be displayed in the terminal and a window dialog.


Use the Permissions to set restrictions to the output PDF file. By default no permissions are set.



The Passwords are used for the encryption. The User password protects the document from unauthorized reading. The Owner password protects the document's restrictions from unauthorized changing. The passwords require maximal 32 latin-1 encoded signs.

If the User and the Owner password is the same, the PDFtk command will only contain the user_pw option.


It is possible to encrypt the output document with none, the RC4 40-bit (PDF 1.1 - 1.3) or RC4 128-bit (PDF 1.4) cypher using the user and owner password.

Allow features

  • Printing - allows top quality printing
  • Degraded Printing - allows lower quality printing
  • Copy Contents - allows to copy contents (also allows to read with screenreaders)
  • Screenreaders - allows to read contents with screenreaders
  • Modify Contents - allows to modify contents (also allows to assemble contents)
  • Assembly - allows to assemble contents
  • Modify Annotations - allows to modify annotations (also allows to fill in)
  • Fill In - allows to fill in annotations

The feature flags in the area Allow are not observed by all PDF readers.


Catenate assembles pages from input PDFs to create a new PDF. Use catenate to merge PDF pages or to remove PDF pages from documents. You can also use it to rotate PDF pages. Page order in the new PDF is specified by the order of the given page ranges.

Handle documents


Entries at the catenate list are handled from top down. To add new documents use the Add button or Drag&Drop. If a new document is added, the pages will be countet. The Remove button removes selected document entries from list. The Copy button copies selected entries at list. The Arrows buttons change the order of selected document entries.

PDF Chain will not verify if a document is really a PDF or not. A Page number (PN) of zero pages could be a hint for a corrupt or non PDF. But it's possible, to count zero pages on a regular and useable PDF file.

Entries list


Page selection


At Page selection is a text field to select pages and page ranges of the given file of a list entrie. Pages and page ranges are handled form left to right.

  • For separating single pages and ranges use the space sign (don't use , or ;).
  • The - sign connects pages to a page range.
  • The keyword end means the last page of a document.
  • The keysign r stands for reverse and counts the pages from the back of a document (e.g. r2 stands for the second last page).
Page selectionMeaning
1-endallselects all pages of a document
end-1allselects all pages of a document in reversed order
2-r2allselects all pages without the first and the last page
1 r3 endallselects the first, third last and the last page
1-10 5-endalltwo overlapping page ranges, separatetd by the space sign
1-10 12-endalltwo page rages select all pages without page 11
1-3 5 7 9-endalltwo page ranges and two explicit selected pages

The Page selection also includes a selection box, switchable between all, even and odd. This filters effect only to selected page ranges, not to single selected pages!

Page selectionMeaning
1-endevenselects only the even pages of the document (page 2, 4, 6, ...)
1-endoddselects only the odd pages of the document (page 1, 3, 5, ...)
1-3 4 6 7-endodd selects the odd pages of the page ranges and the pages 4 and 6
1-4 5 7 8-endevenselects pages 2, 4, 5, 7, 8, 10, 12, ... (in this order)

PDF Chain verify your page selection instantly after entering. Wrong expressions will coloring the text red. Unforunately this is only visible on unselected entries. Page numbers which are bigger than the counted page number aren't allowed.


If the Shuffle button is active, the selected pages from every list entrie will be merged page by page. That means after the first page of the first document, the first page of the second document follows, then the first page of the third document and so on. After the first page of the last document, the second page of the first document follows, then the second page of the second document and so on. This kind of sortering is for example usefull to merge a documents togeher, when front and back sides are scaned in seperate documents.



At section Burst, a document will be split into its single pages, everyone saved in a separate PDF file. By pressing the Save As button you have to select a target folder.

The filenames of the single pages is defined by the Output PDF pattern. The Prefix defines an prefix text part of the filename. Followed by the page number and the file extension (".pdf").

Don't use Burst and Catenate for removing single pages from a document. Use Catenate only for this! A Page selection like 1-5 7-end will remove page 6 for example.

Extended options

At the expander Extended options you can change the counting Base from ten (Decimal) to eight (Octal) or 16 (Hexadecimal). The Digits defines the number of digits of the counter. By default they will be calculated automtically (Auto) by the number of pages of a document and the Base. It's possibel to set them Manualy. The Suffix part is empty by default. Therewith you can add some text behind the counter. And it's possible to remove the Extension from the file names.

The whole Output PDF pattern looks like: <Prefix><Counter><Suffix><Extension>
The default PDFtk pattern for a ten page document is: Page%02d.pdf

Background / Stamp


Background / Stamp is a section where you can combine two PDF files in an overlay mode. The Document gets a background layer behind or a stamp layer printed on top. The Layer has to be a PDF file, too. Is the option Use multiple pages disabled, only the first page of the layer PDF is used for background or stamp. Is it enabled all pages of the layer PDF will be used for. Has the layer PDF less pages than the document, then the last page of the layer PDF will be repeated on all posterior pages of the document!

Don't use image fiels for the layer document! Use the command convert from ImageMagick to convert a image file to a pdf file.

  • $ convert -quality 100 -density 100 sample.png sample.pdf


Here you can attach some files to a document. Choose the Document and add some files to attach to the list. To extract attachments use the option Unpack attached files at the Tools.

The option to attach files to a page is not supported by all PDF readers!


The Tools are a collection of different options of the PDFtk command line program. Choose the Document to work with on top of the section. Read more about at the PDFtk man page.

Repair document

Repair a PDF’s corrupted XREF table and stream lengths, if possible. It uses a simple PDFtk cat command wihout any option.
Read about at the PDFtk examples .

Unpack attached files from document

Extracts attached files from the document. Choose a target folder with the Save As button.
Read about at the PDFtk man page .

Uncompress and Compress document

Use uncompress document if you want to edit a PDF with a text editor like gedit, kate, vim or emacs. After work compress the document again. This is no zip-like compression!
Read about at the PDFtk man page .

Edit meta data

Dump annotation data from document

Read about at the PDFtk man page .

Dump data fields from document

Read about at the PDFtk man page .

Dump data from document

Read about at the PDFtk man page .

Update info of document

Read about at the PDFtk man page .

Edit form fields

Generate FDF from document

Read about at the PDFtk man page .

Fill form of document

Read about at the PDFtk man page .

Document flatten

Read about at the PDFtk man page .

Drop XFA from document

Read about at the PDFtk man page .