Building pdftk (PDF Toolkit) on FC9 and FC10
December 2, 2008 – 10:08 amThe PDF toolkit is command line app for manipulating PDFs. I use it to split faxes received in Hylafax into one file per page. I recently upgraded a server to x86 64 Fedora Core 9 and found that all of the precompiled versions of pdftk wouldn't work. I tried to build my own and got some awesome errors:
Exception in thread "main" java.io.IOException: can't find class file java_local/security/Provider.class in java.net.URLClassLoader
After much Googling I stumbled on a source RPM for Fedora Core 7 and I went to work. The procedure is pretty simple, grab the source RPM, run:
rpmbuild --rebuild pdftk-1.41-5.fc7.src.rpm
Then wait out all of the warnings and run:
rpm -ivh /usr/src/redhat/RPMS/x86_64/pdftk-1.41-5.fc9.x86_64.rpm
The built RPMs filename will probably be different on your system.
Downloads:
- Source RPM pdftk-1.41-5.fc7.src.rpm
- Built x86 64 Fedora 9 RPM pdftk-1.41-5.fc9.x86_64.rpm
- Built i386 Fedora 10 RPM pdftk-1.41-5.fc10.i386.rpm
UPDATE 3/6/09
I'm getting a lot of reports that the source RPM works for Fedora Core 10 too. Tom of comment fame was nice enough to send me a copy he built for i386. It's linked above for your downloading pleasure.
A note about the warnings... Indeed there are a lot, and they take forever. I've used my copy of pdftk for about four months in a production enviroment on something like 60K faxes by now. I have never had a problem.

5 Responses to “Building pdftk (PDF Toolkit) on FC9 and FC10”
Hi! Just wanted to let you know that this also works for Fedora Core 10. I googled a bit and couldn’t find either an RPM or a source RPM that would compile on FC10. This one compiles fine and seems to work OK on Fedora 10.
Regards,
Cesar
By Cesar Miquel on Feb 17, 2009
Man thats alot of Java warnings!
) Obviously new coding in later version java compilers. But works great thanks!
By Gus on Feb 25, 2009
Yes, thanks for this. We had been stumped by the awesome errors, and this did this trick.
By Matt on Mar 5, 2009
Another Fedora 10 success report. Thanks for this!
To clarify, “wait out all the warnings” on my machine (1.8Ghz Core Duo) meant a wait of >30 minutes. Seems very wrong, but pdftk installed and works fine.
Also, it looks like pdftk is close to being included in the Fedora distro: https://bugzilla.redhat.com/show_bug.cgi?id=485641
By Tom on Mar 5, 2009
As of tonight, pdftk-1.41-13.fc10.i386
is now in the Fedora ‘updates’ repository, so you should just be able to yum install it.
By Tom on Mar 19, 2009