Skip to main content

Install PDFTk on Ubuntu 18.04 Bionic

pdftk is missing from the official repository right now. That’s an issue for many people.

I needed PDFTK to be installed on Ubuntu (18.04) due to the need to manipulate PDFs. Unfortunately, because I used Laravel Forge, they only allow Ubuntu, and apparently PDFtk is not longer working with Ubuntu 18.04. There is a workaround! Follow the below to get it working.

There’s a workaround here: How can I install pdftk in Ubuntu 18.04 Bionic?

Quick and easy workaround

 

 

UPDATED 8/2/2020

Try sudo snap install pdftk

Set up symlink so it works!

sudo ln -fs /snap/pdftk/current/usr/bin/pdftk /usr/bin/pdftk

The below seems not to work any more.

In SSH on your Ubuntu 18.04 server, do the below:

wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pdftk/pdftk_2.02-4build1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-6/libgcj17_6.4.0-8ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/libgcj-common_6.4-3ubuntu1_all.deb
sudo dpkg -i pdftk_2.02-4build1_amd64.deb libgcj17_6.4.0-8ubuntu1_amd64.deb libgcj-common_6.4-3ubuntu1_all.deb

Then type ‘pdftk’, it should come up.

Hope that helps!

One thought to “Install PDFTk on Ubuntu 18.04 Bionic”

  1. One piece missing was…
    Package gcc-6-base is not installed.
    Installed that thru synaptic and then was able to complete load and execution.

Leave a Reply