Adding PDFtk to Bluehost

I recently upgraded my Bluehost account. The new server did not have PDFtk Server installed which broke a few of my PHP scripts that filled and flattened PDF forms using php-pdftk. I decided to try to do a local install. First I needed gaining shell access and upload the correct RPM (pdftk-2.02-1.el6.x86_64.rpm) to my home directory. Next, using SSH, I ran this command:

rpm2cpio pdftk-2.02-1.el6.x86_64.rpm | cpio -idmv

After the RPM was extracted to my home directory, I tested to see if it worked using this command:

~/usr/bin/pdftk --version

Finally I edited the pdfForm.php so that each instance of the pdftk command included the path to the executable (~/usr/bin/). Everything seems to be working again.

PS – The server must have had libgcj already installed.

NOTE: this no longer supported on CentOS 7+

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *