PDFtk RPMs for Recent Fedora and CentOS

PDFtk is a useful program for manipulating PDFs. The command line version had generally been packaged with Linux, but not so much now. The program depends on GCJ, the GNU Java compiler, which is is no longer supported.

I miss the thing, so I managed to create some RPMs that install on newer releases. You need to install both the pdftk and gcc6-libgcj RPMs.

Built on Fedora 30 and also tested on 32:

Built on CentOS 7, and also tested on 8.

The method for building these on the systems which don't have GCJ is is nothing nothing clever; just Build GCC 6.5.0 to get the compiler to build pdftk and get the libraries to run it. Those are packaged in the above RPMs, which is all you need.

If you really, really want the old compiler for some reason, you can get that below. Hint: you don't want it.
The compiler RPM contains GCC 6.5.0, the C, C++ and java compilers. These install separately from the standard compiler for your distro, and the RPM does not add them to your executable or library paths. To use the compilers, the RPM provides a small program called gcc6mode, which just sets some environment variables and runs bash. From this, you can run the version 6 compilers. I have tried it out only a little, but it will build pdftk from source, if you're so inclined.

Also, the source RPM. It takes a long time to build since it must first compile the compiler to build the tool. It will produce all three binary RPMs.

It seems to work, but has few other virtues. I have tested the install on my own systems and on some VMs with clean distro installs and it seems to function. Happy hacking.