Instructions, code and tips on how to build pdftk on various platforms.
Download and unpack: pdftk-1.44-src.zip (~1.3MB)
Review the pdftk GPL license information in: license_gpl_pdftk/readme.txt.
Review the Makefile provided for your platform and confim 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 doesn’t need set.
Change into the pdftk sub-directory,
Debian or Ubuntu systems: run make -f Makefile.Debian
RedHat systems: run make -f Makefile.RedHat
Slackware systems: run
make -f Makefile.Slackware-13.1
Mac OS X systems: run make -f Makefile.OSX-10.6
Windows systems: run make -f Makefile.Windows
Reduce the resulting filesize with strip, e.g.:
strip pdftk.exe
I have built pdftk 1.44 using gcc/gcj/libgcj versions 3.4.5, 4.4.1 and 4.5.0. Pdftk 1.4x fails to build on gcc 3.3.5 due to missing libgcj features. If you have gcc 3.3, try building pdftk 1.12 instead. Gcc 3.2 folks might also have some luck with the older pdftk versions.
Article Author: Sid Steward
PDF Labs is where you can find professional tools and services for your PDF-related jobs. It is run by Sid Steward, author of PDF Hacks (O’Reilly) and the popular PDF Toolkit.
Contact Sid Steward by email. Please include pdftk in the subject, even if it isn’t related to your inquiry:
"If you like pdftk, then you’ll appreciate the other 25 programs and scripts I created for my book, PDF Hacks. Read some sample hacks and the Table of Contents. See an online example or two, and then buy the book. Thanks!" — Sid
Copyright © 2004–2011 Sid Steward