How can I install pdftk in Ubuntu 18.04 Bionic?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
41
down vote
favorite
Is there any chance of getting pdftk
working in Ubuntu 18.04?
I need this for creating PDF files with a watermark in shell.
Or, does anybody know a working alternative to pdftk
to generate a PDF with a watermark in shell?
I already check/try out all of them:
sudo apt list pdf*
Listing... Done
pdf-presenter-console/bionic 4.1-2 amd64
pdf-redact-tools/bionic,bionic 0.1.2-1 all
pdf.js-common/bionic,bionic 1.5.188+dfsg-1 all
pdf2djvu/bionic 0.9.8-0ubuntu1 amd64
pdf2svg/bionic 0.2.3-1 amd64
pdfcrack/bionic 0.16-1 amd64
pdfcube/bionic 0.0.5-2build6 amd64
pdfcube-dbg/bionic 0.0.5-2build6 amd64
pdfgrep/bionic 2.0.1-1 amd64
pdfminer-data/bionic,bionic 20140328+dfsg-1 all
pdfmod/bionic,bionic 0.9.1-8 all
pdfmod-dbg/bionic,bionic 0.9.1-8 all
pdfposter/bionic,bionic 0.6.0-2 all
pdfresurrect/bionic 0.14-1 amd64
pdfsam/bionic,bionic 3.3.5-1 all
pdfsandwich/bionic 0.1.6-1 amd64
pdfshuffler/bionic,bionic 0.6.0-8 all
pdftoipe/bionic 1:7.2.7-1build1 amd64
But did not find a working tool.
software-installation pdf 18.04 pdftk
 |Â
show 5 more comments
up vote
41
down vote
favorite
Is there any chance of getting pdftk
working in Ubuntu 18.04?
I need this for creating PDF files with a watermark in shell.
Or, does anybody know a working alternative to pdftk
to generate a PDF with a watermark in shell?
I already check/try out all of them:
sudo apt list pdf*
Listing... Done
pdf-presenter-console/bionic 4.1-2 amd64
pdf-redact-tools/bionic,bionic 0.1.2-1 all
pdf.js-common/bionic,bionic 1.5.188+dfsg-1 all
pdf2djvu/bionic 0.9.8-0ubuntu1 amd64
pdf2svg/bionic 0.2.3-1 amd64
pdfcrack/bionic 0.16-1 amd64
pdfcube/bionic 0.0.5-2build6 amd64
pdfcube-dbg/bionic 0.0.5-2build6 amd64
pdfgrep/bionic 2.0.1-1 amd64
pdfminer-data/bionic,bionic 20140328+dfsg-1 all
pdfmod/bionic,bionic 0.9.1-8 all
pdfmod-dbg/bionic,bionic 0.9.1-8 all
pdfposter/bionic,bionic 0.6.0-2 all
pdfresurrect/bionic 0.14-1 amd64
pdfsam/bionic,bionic 3.3.5-1 all
pdfsandwich/bionic 0.1.6-1 amd64
pdfshuffler/bionic,bionic 0.6.0-8 all
pdftoipe/bionic 1:7.2.7-1build1 amd64
But did not find a working tool.
software-installation pdf 18.04 pdftk
3
and PDF Chain, too! These two tools were invaluable to me!
â Joshp.23
Apr 26 at 20:02
3
Don't just write "You can try...", explain how you do it and the steps you have to follow to make the answer more helpful
â ADDB
Apr 27 at 17:32
1
If you solved your problem yourself, please answer your own question and accept your answer. DonâÂÂt put the answer in your question or the comments! :-) I took the liberty to revert the change that added the answer but you can always review a postâÂÂs history through the link below it.
â David Foerster
Apr 27 at 21:25
5
FYI, pdftk was dropped from the repositories and there's a feature request to add it back.
â David Foerster
Apr 27 at 21:28
1
it's a shame that such a nice tool got removed just because the developers didn't find an acceptable solution
â Daniel Alder
Jul 1 at 23:16
 |Â
show 5 more comments
up vote
41
down vote
favorite
up vote
41
down vote
favorite
Is there any chance of getting pdftk
working in Ubuntu 18.04?
I need this for creating PDF files with a watermark in shell.
Or, does anybody know a working alternative to pdftk
to generate a PDF with a watermark in shell?
I already check/try out all of them:
sudo apt list pdf*
Listing... Done
pdf-presenter-console/bionic 4.1-2 amd64
pdf-redact-tools/bionic,bionic 0.1.2-1 all
pdf.js-common/bionic,bionic 1.5.188+dfsg-1 all
pdf2djvu/bionic 0.9.8-0ubuntu1 amd64
pdf2svg/bionic 0.2.3-1 amd64
pdfcrack/bionic 0.16-1 amd64
pdfcube/bionic 0.0.5-2build6 amd64
pdfcube-dbg/bionic 0.0.5-2build6 amd64
pdfgrep/bionic 2.0.1-1 amd64
pdfminer-data/bionic,bionic 20140328+dfsg-1 all
pdfmod/bionic,bionic 0.9.1-8 all
pdfmod-dbg/bionic,bionic 0.9.1-8 all
pdfposter/bionic,bionic 0.6.0-2 all
pdfresurrect/bionic 0.14-1 amd64
pdfsam/bionic,bionic 3.3.5-1 all
pdfsandwich/bionic 0.1.6-1 amd64
pdfshuffler/bionic,bionic 0.6.0-8 all
pdftoipe/bionic 1:7.2.7-1build1 amd64
But did not find a working tool.
software-installation pdf 18.04 pdftk
Is there any chance of getting pdftk
working in Ubuntu 18.04?
I need this for creating PDF files with a watermark in shell.
Or, does anybody know a working alternative to pdftk
to generate a PDF with a watermark in shell?
I already check/try out all of them:
sudo apt list pdf*
Listing... Done
pdf-presenter-console/bionic 4.1-2 amd64
pdf-redact-tools/bionic,bionic 0.1.2-1 all
pdf.js-common/bionic,bionic 1.5.188+dfsg-1 all
pdf2djvu/bionic 0.9.8-0ubuntu1 amd64
pdf2svg/bionic 0.2.3-1 amd64
pdfcrack/bionic 0.16-1 amd64
pdfcube/bionic 0.0.5-2build6 amd64
pdfcube-dbg/bionic 0.0.5-2build6 amd64
pdfgrep/bionic 2.0.1-1 amd64
pdfminer-data/bionic,bionic 20140328+dfsg-1 all
pdfmod/bionic,bionic 0.9.1-8 all
pdfmod-dbg/bionic,bionic 0.9.1-8 all
pdfposter/bionic,bionic 0.6.0-2 all
pdfresurrect/bionic 0.14-1 amd64
pdfsam/bionic,bionic 3.3.5-1 all
pdfsandwich/bionic 0.1.6-1 amd64
pdfshuffler/bionic,bionic 0.6.0-8 all
pdftoipe/bionic 1:7.2.7-1build1 amd64
But did not find a working tool.
software-installation pdf 18.04 pdftk
edited May 1 at 12:07
![](https://i.stack.imgur.com/9L8vd.png?s=32&g=1)
![](https://i.stack.imgur.com/9L8vd.png?s=32&g=1)
dessert
19.8k55594
19.8k55594
asked Apr 26 at 19:40
WiKrIe
389129
389129
3
and PDF Chain, too! These two tools were invaluable to me!
â Joshp.23
Apr 26 at 20:02
3
Don't just write "You can try...", explain how you do it and the steps you have to follow to make the answer more helpful
â ADDB
Apr 27 at 17:32
1
If you solved your problem yourself, please answer your own question and accept your answer. DonâÂÂt put the answer in your question or the comments! :-) I took the liberty to revert the change that added the answer but you can always review a postâÂÂs history through the link below it.
â David Foerster
Apr 27 at 21:25
5
FYI, pdftk was dropped from the repositories and there's a feature request to add it back.
â David Foerster
Apr 27 at 21:28
1
it's a shame that such a nice tool got removed just because the developers didn't find an acceptable solution
â Daniel Alder
Jul 1 at 23:16
 |Â
show 5 more comments
3
and PDF Chain, too! These two tools were invaluable to me!
â Joshp.23
Apr 26 at 20:02
3
Don't just write "You can try...", explain how you do it and the steps you have to follow to make the answer more helpful
â ADDB
Apr 27 at 17:32
1
If you solved your problem yourself, please answer your own question and accept your answer. DonâÂÂt put the answer in your question or the comments! :-) I took the liberty to revert the change that added the answer but you can always review a postâÂÂs history through the link below it.
â David Foerster
Apr 27 at 21:25
5
FYI, pdftk was dropped from the repositories and there's a feature request to add it back.
â David Foerster
Apr 27 at 21:28
1
it's a shame that such a nice tool got removed just because the developers didn't find an acceptable solution
â Daniel Alder
Jul 1 at 23:16
3
3
and PDF Chain, too! These two tools were invaluable to me!
â Joshp.23
Apr 26 at 20:02
and PDF Chain, too! These two tools were invaluable to me!
â Joshp.23
Apr 26 at 20:02
3
3
Don't just write "You can try...", explain how you do it and the steps you have to follow to make the answer more helpful
â ADDB
Apr 27 at 17:32
Don't just write "You can try...", explain how you do it and the steps you have to follow to make the answer more helpful
â ADDB
Apr 27 at 17:32
1
1
If you solved your problem yourself, please answer your own question and accept your answer. DonâÂÂt put the answer in your question or the comments! :-) I took the liberty to revert the change that added the answer but you can always review a postâÂÂs history through the link below it.
â David Foerster
Apr 27 at 21:25
If you solved your problem yourself, please answer your own question and accept your answer. DonâÂÂt put the answer in your question or the comments! :-) I took the liberty to revert the change that added the answer but you can always review a postâÂÂs history through the link below it.
â David Foerster
Apr 27 at 21:25
5
5
FYI, pdftk was dropped from the repositories and there's a feature request to add it back.
â David Foerster
Apr 27 at 21:28
FYI, pdftk was dropped from the repositories and there's a feature request to add it back.
â David Foerster
Apr 27 at 21:28
1
1
it's a shame that such a nice tool got removed just because the developers didn't find an acceptable solution
â Daniel Alder
Jul 1 at 23:16
it's a shame that such a nice tool got removed just because the developers didn't find an acceptable solution
â Daniel Alder
Jul 1 at 23:16
 |Â
show 5 more comments
7 Answers
7
active
oldest
votes
up vote
28
down vote
accepted
The pdftk package in Ubuntu (and its upstream Debian package) was dropped due to its dependency on the now deprecated GCJ runtime. I found a fork that depends on OpenJDK or similar instead.
Install from PPA
I built a Deb package (for Bionic only) with suitable dependencies:
sudo add-apt-repository ppa:malteworld/ppa
sudo apt update
sudo apt install pdftk
The package contains a wrapper script placed in /usr/bin
, so you can invoke it as normally:
pdftk <arguments> ...
Install from source
Install the build tools and dependencies:
sudo apt install git default-jdk-headless ant
libcommons-lang3-java libbcprov-javaOf course you can use a different supported JDK than the one supplied by
default-jdk-headless
.Download Marc VinyalâÂÂs pdftk fork:
git clone https://gitlab.com/pdftk-java/pdftk.git
cd pdftkBuild the JAR package:
ant -lib /usr/share/java jar
Run the JAR package:
java -jar build/jar/pdftk.jar --help
(Optional) To run the JAR package, e. g. when you distribute it to other systems, you need at least a working (headless) JRE like from the
default-jre-headless
package as well as the Java librarieslibcommons-lang3-java
andlibbcprov-java
:sudo apt install default-jre-headless libcommons-lang3-java libbcprov-java
Again you can use a different JRE than
default-jre-headless
. This pdftk fork also supports builds for older JRE versions (âÂÂ¥ 7 according to the documentation).(Optional) You can teach Linux to execute JAR (Java Archive) files via
update-binfmts(8)
. Most JREs shipped in Deb packages, including those in CanonicalâÂÂs package repositories, take care of that during installation, though it appears to be buggy in some OpenJDK packages.
P.S.: I tried this with the non-headless OpenJDK 9 in Ubuntu Trusty but I see little reasons why it shouldn't work with headless OpenJDK 10 in Bionic.
Without looking into this at all, I wonder if this will work with PDFChain, the pdftk gui that was also dropped...
â Joshp.23
Apr 28 at 17:03
2
@Joshp.23: PDF Chain is a C++ application and not directly affected by the deprecation of GCJ. It needs a workingpdftk
executable but doesn't care how it works under the hood.
â David Foerster
Apr 28 at 18:52
I was reading another question about installing a different package that was dropped from the repos for 18.04, and one user suggested installing the .deb package using gdebi, which should handle dependencies. Do you think that would work or would it create some problems? That may be a dumb question--I'm just trying to understand more about package management.
â Emily
May 15 at 16:22
@Emily: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. YouâÂÂre welcome to send me a comment with a notification to draw my attention to it. Thanks. P.S.: Look at the other answers to this question; some of them mention something similar to your proposition.
â David Foerster
May 15 at 16:24
Note that the URL for Marc Vinyal's pdftk fork has changed: gitlab.com/pdftk-java/pdftk
â Daniel Martin
Aug 6 at 17:27
 |Â
show 1 more comment
up vote
17
down vote
For Ubuntu 18.04, just install the pdftk snap package:
sudo snap install pdftk
1
Symlinking didn't work for me, becausesnap
seems to need the script name. But a minimal wrapper script/snap/bin/pdftk-smoser.pdftk "$@"
works equally well.
â Boldewyn
Jun 27 at 20:30
What version of Ubuntu? The precise instructions I give above worked for me. I call pdftk from some perl xml processing scripts and the acid test is the scripts work and produce merged pdf's.
â pgoetz
Jun 28 at 22:34
Kubuntu 18.04, just upgraded from 16.04 and foundpdftk
missing. When I do the symlink, runningpdftk
inbash
yieldssnap
s help message. ¯_(ãÂÂ)_/¯
â Boldewyn
Jun 29 at 6:46
Make sure the snap daemon is running.
â pgoetz
Jul 7 at 21:14
2
i updated the answer above to use just 'pdftk' rather than 'pdftk' as I (smoser) have uploaded a snap named 'pdftk' to the store with the same content. (snapcraft.io/pdftk)
â smoser
Jul 12 at 19:27
 |Â
show 6 more comments
up vote
17
down vote
Installing pdftk on Ubuntu 18.04 amd64
I've written a small bash script which automatise the installation on Ubuntu 18.04. Note that I've downloaded only amd64 packages!
#!/bin/bash
#
# author: abu
# date: May 12 2018
# description: bash script to install pdftk on Ubuntu 18.04 for amd64 machines
##############################################################################
#
# change to /tmp directory
cd /tmp
# download packages
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-6/libgcj17_6.4.0-8ubuntu1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-defaults/libgcj-common_6.4-3ubuntu1_all.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk_2.02-4build1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk-dbg_2.02-4build1_amd64.deb
echo -e "Packages for pdftk downloadednn"
# install packages
echo -e "nn Installing pdftk: nn"
sudo apt-get install ./libgcj17_6.4.0-8ubuntu1_amd64.deb
./libgcj-common_6.4-3ubuntu1_all.deb
./pdftk_2.02-4build1_amd64.deb
./pdftk-dbg_2.02-4build1_amd64.deb
echo -e "nn pdftk installedn"
echo -e " try it in shell with: > pdftk n"
# delete deb files in /tmp directory
rm ./libgcj17_6.4.0-8ubuntu1_amd64.deb
rm ./libgcj-common_6.4-3ubuntu1_all.deb
rm ./pdftk_2.02-4build1_amd64.deb
rm ./pdftk-dbg_2.02-4build1_amd64.deb
This script will download the packages to /tmp
and install from there using an apt install
command! Afterwards the packages in the /tmp
directory will be removed.
To run this script, copy it in an editor and save it e.g. pdftk_installer. Then run it in a terminal with
chmod 755 pdftk_installer
./pdftk_installer
add a comment |Â
up vote
9
down vote
You can try use a docker image of Ubuntu 16.04 with pdftk installed to run pdftk:
Install docker:
sudo apt install docker.io
Pull Ubuntu 16.04 and run a bash shell:
sudo docker run -it ubuntu:16.04 bash
Update and install pdftk from container prompt:
apt update
apt install pdftkOn a new terminal run:
sudo docker ps -a
Commit the image using the CONTAINER ID of ubuntu:16.04 to a new image with pdftk installed:
sudo docker commit CONTAINER_ID ubuntu_pdftk
(Replace
CONTAINER_ID
with your container ID.)Create a file named
pdftk
in/usr/bin
and then make it executable usingchmod +x /usr/bin/pdftk
:#!/bin/sh
set -eu
docker run --name pdftk -it -v "$PWD:/workdir$PWD" -w "/workdir$PWD" ubuntu_pdftk pdftk "$@"
docker rm pdftk
Almost exactly what I did. Except, don't you have a mistake in-v "$PWD:/workdir$PWD" -w "/workdir$PWD"
?
â Ondra à ½ià ¾ka
Jun 12 at 19:51
add a comment |Â
up vote
4
down vote
I was able to install pdftk from artful (17.10) deb packages. Download and then install, in that order :
- libgcj-common
- libgcj17
- pdftk
It's best to install gcc-6-base
first to avoid dependencies error if you do it from cli.
That should do the trick⦠for now.
add a comment |Â
up vote
2
down vote
I made a quick and dirty workaround to get PDFTK running under Bionic.
lsb_release -a && pdftk --version
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
pdftk 2.02 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2003-13 Steward and Lee, LLC - Please Visit: www.pdftk.com
I update my sources.list
and include the following lines:
deb http://no.archive.ubuntu.com/ubuntu/ artful main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful universe
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates universe
deb http://no.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu artful-security universe
deb http://security.ubuntu.com/ubuntu artful-security multiverse
After that I run a simple
sudo apt update
to make the changes take effect.
Then install pdftk via
sudo apt install pdftk
Then remove the Artful sources from the source.list again and this is how I get PDFTK running under Bionic.
Source: https://christiandietze.de/pdftk-with-ubuntu-bionic-18-04/
5
Hi Christian, would you mind updating your answer to include what your workaround is? We prefer if you include the essential parts of the answer here and then provide the link for reference. Thanks!
â CalvT
May 1 at 19:31
1
Yes, especially since the site you linked to seems to be down.
â terdonâ¦
May 2 at 8:35
Hi CalvT, the workaround I use is simply add the artfull packages to apt, install pdftk and remove them. And terdon my site was not down within the last 30 days so I do not know why you should not access the site.
â WiKrIe
May 7 at 19:04
@WiKrIe There is a problem with your site. I can reach the base URL, but not the page you linked. Neither can Wayback Machine. Google cache won't load it, but will load the source. There must be a problem on that page somewhere. So that's why terdon⦠thought your site was down. So did I until I checked. Hope that helps.
â DÃÂvïd
Jun 1 at 11:09
1
-1 for the suggestion to mix repositories meant for different Ubuntu releases without proper priority rules.
â David Foerster
Jun 7 at 10:33
 |Â
show 1 more comment
up vote
0
down vote
What a great opportunity to use some docker magic!
What I did was to use a docker container running ubuntu 16.04, install pdftk
inside it and run it there.
Here are the exact steps if you want to do the same thing:
- Install docker if you don't already have it (https://docs.docker.com/install/)
- Create a directory somewhere called
pdftk
- Create a directory called
docker
inside thepdftk
directory - Copy this Dockerfile into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/docker/pdftk/Dockerfile - Copy this script also into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/scripts/dockershell - Make sure the
dockershell
script is executable - Into the
pdftk
directory, copy all the pdf files you want to work with cd /path/to/pdftk
- Run the dockershell script with the path of the Dockerfile:
docker/dockershell docker/Dockerfile
(this will take some time the very first time you run it)
Now you should have a prompt inside the docker container, from where you can run
pdftk. When you're done, type exit
to exit the container and return to the
host machine. Any newly generated files will be present in the pdftk
directory
(but they'll be owned by root, so you may need to change ownership as necessary).
add a comment |Â
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
28
down vote
accepted
The pdftk package in Ubuntu (and its upstream Debian package) was dropped due to its dependency on the now deprecated GCJ runtime. I found a fork that depends on OpenJDK or similar instead.
Install from PPA
I built a Deb package (for Bionic only) with suitable dependencies:
sudo add-apt-repository ppa:malteworld/ppa
sudo apt update
sudo apt install pdftk
The package contains a wrapper script placed in /usr/bin
, so you can invoke it as normally:
pdftk <arguments> ...
Install from source
Install the build tools and dependencies:
sudo apt install git default-jdk-headless ant
libcommons-lang3-java libbcprov-javaOf course you can use a different supported JDK than the one supplied by
default-jdk-headless
.Download Marc VinyalâÂÂs pdftk fork:
git clone https://gitlab.com/pdftk-java/pdftk.git
cd pdftkBuild the JAR package:
ant -lib /usr/share/java jar
Run the JAR package:
java -jar build/jar/pdftk.jar --help
(Optional) To run the JAR package, e. g. when you distribute it to other systems, you need at least a working (headless) JRE like from the
default-jre-headless
package as well as the Java librarieslibcommons-lang3-java
andlibbcprov-java
:sudo apt install default-jre-headless libcommons-lang3-java libbcprov-java
Again you can use a different JRE than
default-jre-headless
. This pdftk fork also supports builds for older JRE versions (âÂÂ¥ 7 according to the documentation).(Optional) You can teach Linux to execute JAR (Java Archive) files via
update-binfmts(8)
. Most JREs shipped in Deb packages, including those in CanonicalâÂÂs package repositories, take care of that during installation, though it appears to be buggy in some OpenJDK packages.
P.S.: I tried this with the non-headless OpenJDK 9 in Ubuntu Trusty but I see little reasons why it shouldn't work with headless OpenJDK 10 in Bionic.
Without looking into this at all, I wonder if this will work with PDFChain, the pdftk gui that was also dropped...
â Joshp.23
Apr 28 at 17:03
2
@Joshp.23: PDF Chain is a C++ application and not directly affected by the deprecation of GCJ. It needs a workingpdftk
executable but doesn't care how it works under the hood.
â David Foerster
Apr 28 at 18:52
I was reading another question about installing a different package that was dropped from the repos for 18.04, and one user suggested installing the .deb package using gdebi, which should handle dependencies. Do you think that would work or would it create some problems? That may be a dumb question--I'm just trying to understand more about package management.
â Emily
May 15 at 16:22
@Emily: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. YouâÂÂre welcome to send me a comment with a notification to draw my attention to it. Thanks. P.S.: Look at the other answers to this question; some of them mention something similar to your proposition.
â David Foerster
May 15 at 16:24
Note that the URL for Marc Vinyal's pdftk fork has changed: gitlab.com/pdftk-java/pdftk
â Daniel Martin
Aug 6 at 17:27
 |Â
show 1 more comment
up vote
28
down vote
accepted
The pdftk package in Ubuntu (and its upstream Debian package) was dropped due to its dependency on the now deprecated GCJ runtime. I found a fork that depends on OpenJDK or similar instead.
Install from PPA
I built a Deb package (for Bionic only) with suitable dependencies:
sudo add-apt-repository ppa:malteworld/ppa
sudo apt update
sudo apt install pdftk
The package contains a wrapper script placed in /usr/bin
, so you can invoke it as normally:
pdftk <arguments> ...
Install from source
Install the build tools and dependencies:
sudo apt install git default-jdk-headless ant
libcommons-lang3-java libbcprov-javaOf course you can use a different supported JDK than the one supplied by
default-jdk-headless
.Download Marc VinyalâÂÂs pdftk fork:
git clone https://gitlab.com/pdftk-java/pdftk.git
cd pdftkBuild the JAR package:
ant -lib /usr/share/java jar
Run the JAR package:
java -jar build/jar/pdftk.jar --help
(Optional) To run the JAR package, e. g. when you distribute it to other systems, you need at least a working (headless) JRE like from the
default-jre-headless
package as well as the Java librarieslibcommons-lang3-java
andlibbcprov-java
:sudo apt install default-jre-headless libcommons-lang3-java libbcprov-java
Again you can use a different JRE than
default-jre-headless
. This pdftk fork also supports builds for older JRE versions (âÂÂ¥ 7 according to the documentation).(Optional) You can teach Linux to execute JAR (Java Archive) files via
update-binfmts(8)
. Most JREs shipped in Deb packages, including those in CanonicalâÂÂs package repositories, take care of that during installation, though it appears to be buggy in some OpenJDK packages.
P.S.: I tried this with the non-headless OpenJDK 9 in Ubuntu Trusty but I see little reasons why it shouldn't work with headless OpenJDK 10 in Bionic.
Without looking into this at all, I wonder if this will work with PDFChain, the pdftk gui that was also dropped...
â Joshp.23
Apr 28 at 17:03
2
@Joshp.23: PDF Chain is a C++ application and not directly affected by the deprecation of GCJ. It needs a workingpdftk
executable but doesn't care how it works under the hood.
â David Foerster
Apr 28 at 18:52
I was reading another question about installing a different package that was dropped from the repos for 18.04, and one user suggested installing the .deb package using gdebi, which should handle dependencies. Do you think that would work or would it create some problems? That may be a dumb question--I'm just trying to understand more about package management.
â Emily
May 15 at 16:22
@Emily: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. YouâÂÂre welcome to send me a comment with a notification to draw my attention to it. Thanks. P.S.: Look at the other answers to this question; some of them mention something similar to your proposition.
â David Foerster
May 15 at 16:24
Note that the URL for Marc Vinyal's pdftk fork has changed: gitlab.com/pdftk-java/pdftk
â Daniel Martin
Aug 6 at 17:27
 |Â
show 1 more comment
up vote
28
down vote
accepted
up vote
28
down vote
accepted
The pdftk package in Ubuntu (and its upstream Debian package) was dropped due to its dependency on the now deprecated GCJ runtime. I found a fork that depends on OpenJDK or similar instead.
Install from PPA
I built a Deb package (for Bionic only) with suitable dependencies:
sudo add-apt-repository ppa:malteworld/ppa
sudo apt update
sudo apt install pdftk
The package contains a wrapper script placed in /usr/bin
, so you can invoke it as normally:
pdftk <arguments> ...
Install from source
Install the build tools and dependencies:
sudo apt install git default-jdk-headless ant
libcommons-lang3-java libbcprov-javaOf course you can use a different supported JDK than the one supplied by
default-jdk-headless
.Download Marc VinyalâÂÂs pdftk fork:
git clone https://gitlab.com/pdftk-java/pdftk.git
cd pdftkBuild the JAR package:
ant -lib /usr/share/java jar
Run the JAR package:
java -jar build/jar/pdftk.jar --help
(Optional) To run the JAR package, e. g. when you distribute it to other systems, you need at least a working (headless) JRE like from the
default-jre-headless
package as well as the Java librarieslibcommons-lang3-java
andlibbcprov-java
:sudo apt install default-jre-headless libcommons-lang3-java libbcprov-java
Again you can use a different JRE than
default-jre-headless
. This pdftk fork also supports builds for older JRE versions (âÂÂ¥ 7 according to the documentation).(Optional) You can teach Linux to execute JAR (Java Archive) files via
update-binfmts(8)
. Most JREs shipped in Deb packages, including those in CanonicalâÂÂs package repositories, take care of that during installation, though it appears to be buggy in some OpenJDK packages.
P.S.: I tried this with the non-headless OpenJDK 9 in Ubuntu Trusty but I see little reasons why it shouldn't work with headless OpenJDK 10 in Bionic.
The pdftk package in Ubuntu (and its upstream Debian package) was dropped due to its dependency on the now deprecated GCJ runtime. I found a fork that depends on OpenJDK or similar instead.
Install from PPA
I built a Deb package (for Bionic only) with suitable dependencies:
sudo add-apt-repository ppa:malteworld/ppa
sudo apt update
sudo apt install pdftk
The package contains a wrapper script placed in /usr/bin
, so you can invoke it as normally:
pdftk <arguments> ...
Install from source
Install the build tools and dependencies:
sudo apt install git default-jdk-headless ant
libcommons-lang3-java libbcprov-javaOf course you can use a different supported JDK than the one supplied by
default-jdk-headless
.Download Marc VinyalâÂÂs pdftk fork:
git clone https://gitlab.com/pdftk-java/pdftk.git
cd pdftkBuild the JAR package:
ant -lib /usr/share/java jar
Run the JAR package:
java -jar build/jar/pdftk.jar --help
(Optional) To run the JAR package, e. g. when you distribute it to other systems, you need at least a working (headless) JRE like from the
default-jre-headless
package as well as the Java librarieslibcommons-lang3-java
andlibbcprov-java
:sudo apt install default-jre-headless libcommons-lang3-java libbcprov-java
Again you can use a different JRE than
default-jre-headless
. This pdftk fork also supports builds for older JRE versions (âÂÂ¥ 7 according to the documentation).(Optional) You can teach Linux to execute JAR (Java Archive) files via
update-binfmts(8)
. Most JREs shipped in Deb packages, including those in CanonicalâÂÂs package repositories, take care of that during installation, though it appears to be buggy in some OpenJDK packages.
P.S.: I tried this with the non-headless OpenJDK 9 in Ubuntu Trusty but I see little reasons why it shouldn't work with headless OpenJDK 10 in Bionic.
edited Aug 7 at 14:46
answered Apr 27 at 21:56
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
David Foerster
26k1361106
26k1361106
Without looking into this at all, I wonder if this will work with PDFChain, the pdftk gui that was also dropped...
â Joshp.23
Apr 28 at 17:03
2
@Joshp.23: PDF Chain is a C++ application and not directly affected by the deprecation of GCJ. It needs a workingpdftk
executable but doesn't care how it works under the hood.
â David Foerster
Apr 28 at 18:52
I was reading another question about installing a different package that was dropped from the repos for 18.04, and one user suggested installing the .deb package using gdebi, which should handle dependencies. Do you think that would work or would it create some problems? That may be a dumb question--I'm just trying to understand more about package management.
â Emily
May 15 at 16:22
@Emily: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. YouâÂÂre welcome to send me a comment with a notification to draw my attention to it. Thanks. P.S.: Look at the other answers to this question; some of them mention something similar to your proposition.
â David Foerster
May 15 at 16:24
Note that the URL for Marc Vinyal's pdftk fork has changed: gitlab.com/pdftk-java/pdftk
â Daniel Martin
Aug 6 at 17:27
 |Â
show 1 more comment
Without looking into this at all, I wonder if this will work with PDFChain, the pdftk gui that was also dropped...
â Joshp.23
Apr 28 at 17:03
2
@Joshp.23: PDF Chain is a C++ application and not directly affected by the deprecation of GCJ. It needs a workingpdftk
executable but doesn't care how it works under the hood.
â David Foerster
Apr 28 at 18:52
I was reading another question about installing a different package that was dropped from the repos for 18.04, and one user suggested installing the .deb package using gdebi, which should handle dependencies. Do you think that would work or would it create some problems? That may be a dumb question--I'm just trying to understand more about package management.
â Emily
May 15 at 16:22
@Emily: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. YouâÂÂre welcome to send me a comment with a notification to draw my attention to it. Thanks. P.S.: Look at the other answers to this question; some of them mention something similar to your proposition.
â David Foerster
May 15 at 16:24
Note that the URL for Marc Vinyal's pdftk fork has changed: gitlab.com/pdftk-java/pdftk
â Daniel Martin
Aug 6 at 17:27
Without looking into this at all, I wonder if this will work with PDFChain, the pdftk gui that was also dropped...
â Joshp.23
Apr 28 at 17:03
Without looking into this at all, I wonder if this will work with PDFChain, the pdftk gui that was also dropped...
â Joshp.23
Apr 28 at 17:03
2
2
@Joshp.23: PDF Chain is a C++ application and not directly affected by the deprecation of GCJ. It needs a working
pdftk
executable but doesn't care how it works under the hood.â David Foerster
Apr 28 at 18:52
@Joshp.23: PDF Chain is a C++ application and not directly affected by the deprecation of GCJ. It needs a working
pdftk
executable but doesn't care how it works under the hood.â David Foerster
Apr 28 at 18:52
I was reading another question about installing a different package that was dropped from the repos for 18.04, and one user suggested installing the .deb package using gdebi, which should handle dependencies. Do you think that would work or would it create some problems? That may be a dumb question--I'm just trying to understand more about package management.
â Emily
May 15 at 16:22
I was reading another question about installing a different package that was dropped from the repos for 18.04, and one user suggested installing the .deb package using gdebi, which should handle dependencies. Do you think that would work or would it create some problems? That may be a dumb question--I'm just trying to understand more about package management.
â Emily
May 15 at 16:22
@Emily: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. YouâÂÂre welcome to send me a comment with a notification to draw my attention to it. Thanks. P.S.: Look at the other answers to this question; some of them mention something similar to your proposition.
â David Foerster
May 15 at 16:24
@Emily: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. YouâÂÂre welcome to send me a comment with a notification to draw my attention to it. Thanks. P.S.: Look at the other answers to this question; some of them mention something similar to your proposition.
â David Foerster
May 15 at 16:24
Note that the URL for Marc Vinyal's pdftk fork has changed: gitlab.com/pdftk-java/pdftk
â Daniel Martin
Aug 6 at 17:27
Note that the URL for Marc Vinyal's pdftk fork has changed: gitlab.com/pdftk-java/pdftk
â Daniel Martin
Aug 6 at 17:27
 |Â
show 1 more comment
up vote
17
down vote
For Ubuntu 18.04, just install the pdftk snap package:
sudo snap install pdftk
1
Symlinking didn't work for me, becausesnap
seems to need the script name. But a minimal wrapper script/snap/bin/pdftk-smoser.pdftk "$@"
works equally well.
â Boldewyn
Jun 27 at 20:30
What version of Ubuntu? The precise instructions I give above worked for me. I call pdftk from some perl xml processing scripts and the acid test is the scripts work and produce merged pdf's.
â pgoetz
Jun 28 at 22:34
Kubuntu 18.04, just upgraded from 16.04 and foundpdftk
missing. When I do the symlink, runningpdftk
inbash
yieldssnap
s help message. ¯_(ãÂÂ)_/¯
â Boldewyn
Jun 29 at 6:46
Make sure the snap daemon is running.
â pgoetz
Jul 7 at 21:14
2
i updated the answer above to use just 'pdftk' rather than 'pdftk' as I (smoser) have uploaded a snap named 'pdftk' to the store with the same content. (snapcraft.io/pdftk)
â smoser
Jul 12 at 19:27
 |Â
show 6 more comments
up vote
17
down vote
For Ubuntu 18.04, just install the pdftk snap package:
sudo snap install pdftk
1
Symlinking didn't work for me, becausesnap
seems to need the script name. But a minimal wrapper script/snap/bin/pdftk-smoser.pdftk "$@"
works equally well.
â Boldewyn
Jun 27 at 20:30
What version of Ubuntu? The precise instructions I give above worked for me. I call pdftk from some perl xml processing scripts and the acid test is the scripts work and produce merged pdf's.
â pgoetz
Jun 28 at 22:34
Kubuntu 18.04, just upgraded from 16.04 and foundpdftk
missing. When I do the symlink, runningpdftk
inbash
yieldssnap
s help message. ¯_(ãÂÂ)_/¯
â Boldewyn
Jun 29 at 6:46
Make sure the snap daemon is running.
â pgoetz
Jul 7 at 21:14
2
i updated the answer above to use just 'pdftk' rather than 'pdftk' as I (smoser) have uploaded a snap named 'pdftk' to the store with the same content. (snapcraft.io/pdftk)
â smoser
Jul 12 at 19:27
 |Â
show 6 more comments
up vote
17
down vote
up vote
17
down vote
For Ubuntu 18.04, just install the pdftk snap package:
sudo snap install pdftk
For Ubuntu 18.04, just install the pdftk snap package:
sudo snap install pdftk
edited Jul 12 at 23:10
smoser
1,35011014
1,35011014
answered Jun 23 at 0:30
pgoetz
27115
27115
1
Symlinking didn't work for me, becausesnap
seems to need the script name. But a minimal wrapper script/snap/bin/pdftk-smoser.pdftk "$@"
works equally well.
â Boldewyn
Jun 27 at 20:30
What version of Ubuntu? The precise instructions I give above worked for me. I call pdftk from some perl xml processing scripts and the acid test is the scripts work and produce merged pdf's.
â pgoetz
Jun 28 at 22:34
Kubuntu 18.04, just upgraded from 16.04 and foundpdftk
missing. When I do the symlink, runningpdftk
inbash
yieldssnap
s help message. ¯_(ãÂÂ)_/¯
â Boldewyn
Jun 29 at 6:46
Make sure the snap daemon is running.
â pgoetz
Jul 7 at 21:14
2
i updated the answer above to use just 'pdftk' rather than 'pdftk' as I (smoser) have uploaded a snap named 'pdftk' to the store with the same content. (snapcraft.io/pdftk)
â smoser
Jul 12 at 19:27
 |Â
show 6 more comments
1
Symlinking didn't work for me, becausesnap
seems to need the script name. But a minimal wrapper script/snap/bin/pdftk-smoser.pdftk "$@"
works equally well.
â Boldewyn
Jun 27 at 20:30
What version of Ubuntu? The precise instructions I give above worked for me. I call pdftk from some perl xml processing scripts and the acid test is the scripts work and produce merged pdf's.
â pgoetz
Jun 28 at 22:34
Kubuntu 18.04, just upgraded from 16.04 and foundpdftk
missing. When I do the symlink, runningpdftk
inbash
yieldssnap
s help message. ¯_(ãÂÂ)_/¯
â Boldewyn
Jun 29 at 6:46
Make sure the snap daemon is running.
â pgoetz
Jul 7 at 21:14
2
i updated the answer above to use just 'pdftk' rather than 'pdftk' as I (smoser) have uploaded a snap named 'pdftk' to the store with the same content. (snapcraft.io/pdftk)
â smoser
Jul 12 at 19:27
1
1
Symlinking didn't work for me, because
snap
seems to need the script name. But a minimal wrapper script /snap/bin/pdftk-smoser.pdftk "$@"
works equally well.â Boldewyn
Jun 27 at 20:30
Symlinking didn't work for me, because
snap
seems to need the script name. But a minimal wrapper script /snap/bin/pdftk-smoser.pdftk "$@"
works equally well.â Boldewyn
Jun 27 at 20:30
What version of Ubuntu? The precise instructions I give above worked for me. I call pdftk from some perl xml processing scripts and the acid test is the scripts work and produce merged pdf's.
â pgoetz
Jun 28 at 22:34
What version of Ubuntu? The precise instructions I give above worked for me. I call pdftk from some perl xml processing scripts and the acid test is the scripts work and produce merged pdf's.
â pgoetz
Jun 28 at 22:34
Kubuntu 18.04, just upgraded from 16.04 and found
pdftk
missing. When I do the symlink, running pdftk
in bash
yields snap
s help message. ¯_(ãÂÂ)_/¯â Boldewyn
Jun 29 at 6:46
Kubuntu 18.04, just upgraded from 16.04 and found
pdftk
missing. When I do the symlink, running pdftk
in bash
yields snap
s help message. ¯_(ãÂÂ)_/¯â Boldewyn
Jun 29 at 6:46
Make sure the snap daemon is running.
â pgoetz
Jul 7 at 21:14
Make sure the snap daemon is running.
â pgoetz
Jul 7 at 21:14
2
2
i updated the answer above to use just 'pdftk' rather than 'pdftk' as I (smoser) have uploaded a snap named 'pdftk' to the store with the same content. (snapcraft.io/pdftk)
â smoser
Jul 12 at 19:27
i updated the answer above to use just 'pdftk' rather than 'pdftk' as I (smoser) have uploaded a snap named 'pdftk' to the store with the same content. (snapcraft.io/pdftk)
â smoser
Jul 12 at 19:27
 |Â
show 6 more comments
up vote
17
down vote
Installing pdftk on Ubuntu 18.04 amd64
I've written a small bash script which automatise the installation on Ubuntu 18.04. Note that I've downloaded only amd64 packages!
#!/bin/bash
#
# author: abu
# date: May 12 2018
# description: bash script to install pdftk on Ubuntu 18.04 for amd64 machines
##############################################################################
#
# change to /tmp directory
cd /tmp
# download packages
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-6/libgcj17_6.4.0-8ubuntu1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-defaults/libgcj-common_6.4-3ubuntu1_all.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk_2.02-4build1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk-dbg_2.02-4build1_amd64.deb
echo -e "Packages for pdftk downloadednn"
# install packages
echo -e "nn Installing pdftk: nn"
sudo apt-get install ./libgcj17_6.4.0-8ubuntu1_amd64.deb
./libgcj-common_6.4-3ubuntu1_all.deb
./pdftk_2.02-4build1_amd64.deb
./pdftk-dbg_2.02-4build1_amd64.deb
echo -e "nn pdftk installedn"
echo -e " try it in shell with: > pdftk n"
# delete deb files in /tmp directory
rm ./libgcj17_6.4.0-8ubuntu1_amd64.deb
rm ./libgcj-common_6.4-3ubuntu1_all.deb
rm ./pdftk_2.02-4build1_amd64.deb
rm ./pdftk-dbg_2.02-4build1_amd64.deb
This script will download the packages to /tmp
and install from there using an apt install
command! Afterwards the packages in the /tmp
directory will be removed.
To run this script, copy it in an editor and save it e.g. pdftk_installer. Then run it in a terminal with
chmod 755 pdftk_installer
./pdftk_installer
add a comment |Â
up vote
17
down vote
Installing pdftk on Ubuntu 18.04 amd64
I've written a small bash script which automatise the installation on Ubuntu 18.04. Note that I've downloaded only amd64 packages!
#!/bin/bash
#
# author: abu
# date: May 12 2018
# description: bash script to install pdftk on Ubuntu 18.04 for amd64 machines
##############################################################################
#
# change to /tmp directory
cd /tmp
# download packages
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-6/libgcj17_6.4.0-8ubuntu1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-defaults/libgcj-common_6.4-3ubuntu1_all.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk_2.02-4build1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk-dbg_2.02-4build1_amd64.deb
echo -e "Packages for pdftk downloadednn"
# install packages
echo -e "nn Installing pdftk: nn"
sudo apt-get install ./libgcj17_6.4.0-8ubuntu1_amd64.deb
./libgcj-common_6.4-3ubuntu1_all.deb
./pdftk_2.02-4build1_amd64.deb
./pdftk-dbg_2.02-4build1_amd64.deb
echo -e "nn pdftk installedn"
echo -e " try it in shell with: > pdftk n"
# delete deb files in /tmp directory
rm ./libgcj17_6.4.0-8ubuntu1_amd64.deb
rm ./libgcj-common_6.4-3ubuntu1_all.deb
rm ./pdftk_2.02-4build1_amd64.deb
rm ./pdftk-dbg_2.02-4build1_amd64.deb
This script will download the packages to /tmp
and install from there using an apt install
command! Afterwards the packages in the /tmp
directory will be removed.
To run this script, copy it in an editor and save it e.g. pdftk_installer. Then run it in a terminal with
chmod 755 pdftk_installer
./pdftk_installer
add a comment |Â
up vote
17
down vote
up vote
17
down vote
Installing pdftk on Ubuntu 18.04 amd64
I've written a small bash script which automatise the installation on Ubuntu 18.04. Note that I've downloaded only amd64 packages!
#!/bin/bash
#
# author: abu
# date: May 12 2018
# description: bash script to install pdftk on Ubuntu 18.04 for amd64 machines
##############################################################################
#
# change to /tmp directory
cd /tmp
# download packages
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-6/libgcj17_6.4.0-8ubuntu1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-defaults/libgcj-common_6.4-3ubuntu1_all.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk_2.02-4build1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk-dbg_2.02-4build1_amd64.deb
echo -e "Packages for pdftk downloadednn"
# install packages
echo -e "nn Installing pdftk: nn"
sudo apt-get install ./libgcj17_6.4.0-8ubuntu1_amd64.deb
./libgcj-common_6.4-3ubuntu1_all.deb
./pdftk_2.02-4build1_amd64.deb
./pdftk-dbg_2.02-4build1_amd64.deb
echo -e "nn pdftk installedn"
echo -e " try it in shell with: > pdftk n"
# delete deb files in /tmp directory
rm ./libgcj17_6.4.0-8ubuntu1_amd64.deb
rm ./libgcj-common_6.4-3ubuntu1_all.deb
rm ./pdftk_2.02-4build1_amd64.deb
rm ./pdftk-dbg_2.02-4build1_amd64.deb
This script will download the packages to /tmp
and install from there using an apt install
command! Afterwards the packages in the /tmp
directory will be removed.
To run this script, copy it in an editor and save it e.g. pdftk_installer. Then run it in a terminal with
chmod 755 pdftk_installer
./pdftk_installer
Installing pdftk on Ubuntu 18.04 amd64
I've written a small bash script which automatise the installation on Ubuntu 18.04. Note that I've downloaded only amd64 packages!
#!/bin/bash
#
# author: abu
# date: May 12 2018
# description: bash script to install pdftk on Ubuntu 18.04 for amd64 machines
##############################################################################
#
# change to /tmp directory
cd /tmp
# download packages
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-6/libgcj17_6.4.0-8ubuntu1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-defaults/libgcj-common_6.4-3ubuntu1_all.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk_2.02-4build1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk/pdftk-dbg_2.02-4build1_amd64.deb
echo -e "Packages for pdftk downloadednn"
# install packages
echo -e "nn Installing pdftk: nn"
sudo apt-get install ./libgcj17_6.4.0-8ubuntu1_amd64.deb
./libgcj-common_6.4-3ubuntu1_all.deb
./pdftk_2.02-4build1_amd64.deb
./pdftk-dbg_2.02-4build1_amd64.deb
echo -e "nn pdftk installedn"
echo -e " try it in shell with: > pdftk n"
# delete deb files in /tmp directory
rm ./libgcj17_6.4.0-8ubuntu1_amd64.deb
rm ./libgcj-common_6.4-3ubuntu1_all.deb
rm ./pdftk_2.02-4build1_amd64.deb
rm ./pdftk-dbg_2.02-4build1_amd64.deb
This script will download the packages to /tmp
and install from there using an apt install
command! Afterwards the packages in the /tmp
directory will be removed.
To run this script, copy it in an editor and save it e.g. pdftk_installer. Then run it in a terminal with
chmod 755 pdftk_installer
./pdftk_installer
edited Jul 22 at 7:35
![](https://i.stack.imgur.com/9L8vd.png?s=32&g=1)
![](https://i.stack.imgur.com/9L8vd.png?s=32&g=1)
dessert
19.8k55594
19.8k55594
answered Jun 14 at 8:42
![](https://lh6.googleusercontent.com/--DQCbzBiDqA/AAAAAAAAAAI/AAAAAAAAAA8/TXmHT8Jw0GY/photo.jpg?sz=32)
![](https://lh6.googleusercontent.com/--DQCbzBiDqA/AAAAAAAAAAI/AAAAAAAAAA8/TXmHT8Jw0GY/photo.jpg?sz=32)
abu_bua
2,1103721
2,1103721
add a comment |Â
add a comment |Â
up vote
9
down vote
You can try use a docker image of Ubuntu 16.04 with pdftk installed to run pdftk:
Install docker:
sudo apt install docker.io
Pull Ubuntu 16.04 and run a bash shell:
sudo docker run -it ubuntu:16.04 bash
Update and install pdftk from container prompt:
apt update
apt install pdftkOn a new terminal run:
sudo docker ps -a
Commit the image using the CONTAINER ID of ubuntu:16.04 to a new image with pdftk installed:
sudo docker commit CONTAINER_ID ubuntu_pdftk
(Replace
CONTAINER_ID
with your container ID.)Create a file named
pdftk
in/usr/bin
and then make it executable usingchmod +x /usr/bin/pdftk
:#!/bin/sh
set -eu
docker run --name pdftk -it -v "$PWD:/workdir$PWD" -w "/workdir$PWD" ubuntu_pdftk pdftk "$@"
docker rm pdftk
Almost exactly what I did. Except, don't you have a mistake in-v "$PWD:/workdir$PWD" -w "/workdir$PWD"
?
â Ondra à ½ià ¾ka
Jun 12 at 19:51
add a comment |Â
up vote
9
down vote
You can try use a docker image of Ubuntu 16.04 with pdftk installed to run pdftk:
Install docker:
sudo apt install docker.io
Pull Ubuntu 16.04 and run a bash shell:
sudo docker run -it ubuntu:16.04 bash
Update and install pdftk from container prompt:
apt update
apt install pdftkOn a new terminal run:
sudo docker ps -a
Commit the image using the CONTAINER ID of ubuntu:16.04 to a new image with pdftk installed:
sudo docker commit CONTAINER_ID ubuntu_pdftk
(Replace
CONTAINER_ID
with your container ID.)Create a file named
pdftk
in/usr/bin
and then make it executable usingchmod +x /usr/bin/pdftk
:#!/bin/sh
set -eu
docker run --name pdftk -it -v "$PWD:/workdir$PWD" -w "/workdir$PWD" ubuntu_pdftk pdftk "$@"
docker rm pdftk
Almost exactly what I did. Except, don't you have a mistake in-v "$PWD:/workdir$PWD" -w "/workdir$PWD"
?
â Ondra à ½ià ¾ka
Jun 12 at 19:51
add a comment |Â
up vote
9
down vote
up vote
9
down vote
You can try use a docker image of Ubuntu 16.04 with pdftk installed to run pdftk:
Install docker:
sudo apt install docker.io
Pull Ubuntu 16.04 and run a bash shell:
sudo docker run -it ubuntu:16.04 bash
Update and install pdftk from container prompt:
apt update
apt install pdftkOn a new terminal run:
sudo docker ps -a
Commit the image using the CONTAINER ID of ubuntu:16.04 to a new image with pdftk installed:
sudo docker commit CONTAINER_ID ubuntu_pdftk
(Replace
CONTAINER_ID
with your container ID.)Create a file named
pdftk
in/usr/bin
and then make it executable usingchmod +x /usr/bin/pdftk
:#!/bin/sh
set -eu
docker run --name pdftk -it -v "$PWD:/workdir$PWD" -w "/workdir$PWD" ubuntu_pdftk pdftk "$@"
docker rm pdftk
You can try use a docker image of Ubuntu 16.04 with pdftk installed to run pdftk:
Install docker:
sudo apt install docker.io
Pull Ubuntu 16.04 and run a bash shell:
sudo docker run -it ubuntu:16.04 bash
Update and install pdftk from container prompt:
apt update
apt install pdftkOn a new terminal run:
sudo docker ps -a
Commit the image using the CONTAINER ID of ubuntu:16.04 to a new image with pdftk installed:
sudo docker commit CONTAINER_ID ubuntu_pdftk
(Replace
CONTAINER_ID
with your container ID.)Create a file named
pdftk
in/usr/bin
and then make it executable usingchmod +x /usr/bin/pdftk
:#!/bin/sh
set -eu
docker run --name pdftk -it -v "$PWD:/workdir$PWD" -w "/workdir$PWD" ubuntu_pdftk pdftk "$@"
docker rm pdftk
edited Jun 7 at 10:29
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
David Foerster
26k1361106
26k1361106
answered Apr 28 at 21:02
Ademir F Furtado
912
912
Almost exactly what I did. Except, don't you have a mistake in-v "$PWD:/workdir$PWD" -w "/workdir$PWD"
?
â Ondra à ½ià ¾ka
Jun 12 at 19:51
add a comment |Â
Almost exactly what I did. Except, don't you have a mistake in-v "$PWD:/workdir$PWD" -w "/workdir$PWD"
?
â Ondra à ½ià ¾ka
Jun 12 at 19:51
Almost exactly what I did. Except, don't you have a mistake in
-v "$PWD:/workdir$PWD" -w "/workdir$PWD"
?â Ondra à ½ià ¾ka
Jun 12 at 19:51
Almost exactly what I did. Except, don't you have a mistake in
-v "$PWD:/workdir$PWD" -w "/workdir$PWD"
?â Ondra à ½ià ¾ka
Jun 12 at 19:51
add a comment |Â
up vote
4
down vote
I was able to install pdftk from artful (17.10) deb packages. Download and then install, in that order :
- libgcj-common
- libgcj17
- pdftk
It's best to install gcc-6-base
first to avoid dependencies error if you do it from cli.
That should do the trick⦠for now.
add a comment |Â
up vote
4
down vote
I was able to install pdftk from artful (17.10) deb packages. Download and then install, in that order :
- libgcj-common
- libgcj17
- pdftk
It's best to install gcc-6-base
first to avoid dependencies error if you do it from cli.
That should do the trick⦠for now.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
I was able to install pdftk from artful (17.10) deb packages. Download and then install, in that order :
- libgcj-common
- libgcj17
- pdftk
It's best to install gcc-6-base
first to avoid dependencies error if you do it from cli.
That should do the trick⦠for now.
I was able to install pdftk from artful (17.10) deb packages. Download and then install, in that order :
- libgcj-common
- libgcj17
- pdftk
It's best to install gcc-6-base
first to avoid dependencies error if you do it from cli.
That should do the trick⦠for now.
answered May 1 at 8:12
![](https://i.stack.imgur.com/Kl1rq.png?s=32&g=1)
![](https://i.stack.imgur.com/Kl1rq.png?s=32&g=1)
amha
412
412
add a comment |Â
add a comment |Â
up vote
2
down vote
I made a quick and dirty workaround to get PDFTK running under Bionic.
lsb_release -a && pdftk --version
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
pdftk 2.02 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2003-13 Steward and Lee, LLC - Please Visit: www.pdftk.com
I update my sources.list
and include the following lines:
deb http://no.archive.ubuntu.com/ubuntu/ artful main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful universe
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates universe
deb http://no.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu artful-security universe
deb http://security.ubuntu.com/ubuntu artful-security multiverse
After that I run a simple
sudo apt update
to make the changes take effect.
Then install pdftk via
sudo apt install pdftk
Then remove the Artful sources from the source.list again and this is how I get PDFTK running under Bionic.
Source: https://christiandietze.de/pdftk-with-ubuntu-bionic-18-04/
5
Hi Christian, would you mind updating your answer to include what your workaround is? We prefer if you include the essential parts of the answer here and then provide the link for reference. Thanks!
â CalvT
May 1 at 19:31
1
Yes, especially since the site you linked to seems to be down.
â terdonâ¦
May 2 at 8:35
Hi CalvT, the workaround I use is simply add the artfull packages to apt, install pdftk and remove them. And terdon my site was not down within the last 30 days so I do not know why you should not access the site.
â WiKrIe
May 7 at 19:04
@WiKrIe There is a problem with your site. I can reach the base URL, but not the page you linked. Neither can Wayback Machine. Google cache won't load it, but will load the source. There must be a problem on that page somewhere. So that's why terdon⦠thought your site was down. So did I until I checked. Hope that helps.
â DÃÂvïd
Jun 1 at 11:09
1
-1 for the suggestion to mix repositories meant for different Ubuntu releases without proper priority rules.
â David Foerster
Jun 7 at 10:33
 |Â
show 1 more comment
up vote
2
down vote
I made a quick and dirty workaround to get PDFTK running under Bionic.
lsb_release -a && pdftk --version
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
pdftk 2.02 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2003-13 Steward and Lee, LLC - Please Visit: www.pdftk.com
I update my sources.list
and include the following lines:
deb http://no.archive.ubuntu.com/ubuntu/ artful main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful universe
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates universe
deb http://no.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu artful-security universe
deb http://security.ubuntu.com/ubuntu artful-security multiverse
After that I run a simple
sudo apt update
to make the changes take effect.
Then install pdftk via
sudo apt install pdftk
Then remove the Artful sources from the source.list again and this is how I get PDFTK running under Bionic.
Source: https://christiandietze.de/pdftk-with-ubuntu-bionic-18-04/
5
Hi Christian, would you mind updating your answer to include what your workaround is? We prefer if you include the essential parts of the answer here and then provide the link for reference. Thanks!
â CalvT
May 1 at 19:31
1
Yes, especially since the site you linked to seems to be down.
â terdonâ¦
May 2 at 8:35
Hi CalvT, the workaround I use is simply add the artfull packages to apt, install pdftk and remove them. And terdon my site was not down within the last 30 days so I do not know why you should not access the site.
â WiKrIe
May 7 at 19:04
@WiKrIe There is a problem with your site. I can reach the base URL, but not the page you linked. Neither can Wayback Machine. Google cache won't load it, but will load the source. There must be a problem on that page somewhere. So that's why terdon⦠thought your site was down. So did I until I checked. Hope that helps.
â DÃÂvïd
Jun 1 at 11:09
1
-1 for the suggestion to mix repositories meant for different Ubuntu releases without proper priority rules.
â David Foerster
Jun 7 at 10:33
 |Â
show 1 more comment
up vote
2
down vote
up vote
2
down vote
I made a quick and dirty workaround to get PDFTK running under Bionic.
lsb_release -a && pdftk --version
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
pdftk 2.02 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2003-13 Steward and Lee, LLC - Please Visit: www.pdftk.com
I update my sources.list
and include the following lines:
deb http://no.archive.ubuntu.com/ubuntu/ artful main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful universe
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates universe
deb http://no.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu artful-security universe
deb http://security.ubuntu.com/ubuntu artful-security multiverse
After that I run a simple
sudo apt update
to make the changes take effect.
Then install pdftk via
sudo apt install pdftk
Then remove the Artful sources from the source.list again and this is how I get PDFTK running under Bionic.
Source: https://christiandietze.de/pdftk-with-ubuntu-bionic-18-04/
I made a quick and dirty workaround to get PDFTK running under Bionic.
lsb_release -a && pdftk --version
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
pdftk 2.02 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2003-13 Steward and Lee, LLC - Please Visit: www.pdftk.com
I update my sources.list
and include the following lines:
deb http://no.archive.ubuntu.com/ubuntu/ artful main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates main restricted
deb http://no.archive.ubuntu.com/ubuntu/ artful universe
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates universe
deb http://no.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-updates multiverse
deb http://no.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu artful-security universe
deb http://security.ubuntu.com/ubuntu artful-security multiverse
After that I run a simple
sudo apt update
to make the changes take effect.
Then install pdftk via
sudo apt install pdftk
Then remove the Artful sources from the source.list again and this is how I get PDFTK running under Bionic.
Source: https://christiandietze.de/pdftk-with-ubuntu-bionic-18-04/
edited Jun 7 at 10:33
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
David Foerster
26k1361106
26k1361106
answered May 1 at 19:27
WiKrIe
389129
389129
5
Hi Christian, would you mind updating your answer to include what your workaround is? We prefer if you include the essential parts of the answer here and then provide the link for reference. Thanks!
â CalvT
May 1 at 19:31
1
Yes, especially since the site you linked to seems to be down.
â terdonâ¦
May 2 at 8:35
Hi CalvT, the workaround I use is simply add the artfull packages to apt, install pdftk and remove them. And terdon my site was not down within the last 30 days so I do not know why you should not access the site.
â WiKrIe
May 7 at 19:04
@WiKrIe There is a problem with your site. I can reach the base URL, but not the page you linked. Neither can Wayback Machine. Google cache won't load it, but will load the source. There must be a problem on that page somewhere. So that's why terdon⦠thought your site was down. So did I until I checked. Hope that helps.
â DÃÂvïd
Jun 1 at 11:09
1
-1 for the suggestion to mix repositories meant for different Ubuntu releases without proper priority rules.
â David Foerster
Jun 7 at 10:33
 |Â
show 1 more comment
5
Hi Christian, would you mind updating your answer to include what your workaround is? We prefer if you include the essential parts of the answer here and then provide the link for reference. Thanks!
â CalvT
May 1 at 19:31
1
Yes, especially since the site you linked to seems to be down.
â terdonâ¦
May 2 at 8:35
Hi CalvT, the workaround I use is simply add the artfull packages to apt, install pdftk and remove them. And terdon my site was not down within the last 30 days so I do not know why you should not access the site.
â WiKrIe
May 7 at 19:04
@WiKrIe There is a problem with your site. I can reach the base URL, but not the page you linked. Neither can Wayback Machine. Google cache won't load it, but will load the source. There must be a problem on that page somewhere. So that's why terdon⦠thought your site was down. So did I until I checked. Hope that helps.
â DÃÂvïd
Jun 1 at 11:09
1
-1 for the suggestion to mix repositories meant for different Ubuntu releases without proper priority rules.
â David Foerster
Jun 7 at 10:33
5
5
Hi Christian, would you mind updating your answer to include what your workaround is? We prefer if you include the essential parts of the answer here and then provide the link for reference. Thanks!
â CalvT
May 1 at 19:31
Hi Christian, would you mind updating your answer to include what your workaround is? We prefer if you include the essential parts of the answer here and then provide the link for reference. Thanks!
â CalvT
May 1 at 19:31
1
1
Yes, especially since the site you linked to seems to be down.
â terdonâ¦
May 2 at 8:35
Yes, especially since the site you linked to seems to be down.
â terdonâ¦
May 2 at 8:35
Hi CalvT, the workaround I use is simply add the artfull packages to apt, install pdftk and remove them. And terdon my site was not down within the last 30 days so I do not know why you should not access the site.
â WiKrIe
May 7 at 19:04
Hi CalvT, the workaround I use is simply add the artfull packages to apt, install pdftk and remove them. And terdon my site was not down within the last 30 days so I do not know why you should not access the site.
â WiKrIe
May 7 at 19:04
@WiKrIe There is a problem with your site. I can reach the base URL, but not the page you linked. Neither can Wayback Machine. Google cache won't load it, but will load the source. There must be a problem on that page somewhere. So that's why terdon⦠thought your site was down. So did I until I checked. Hope that helps.
â DÃÂvïd
Jun 1 at 11:09
@WiKrIe There is a problem with your site. I can reach the base URL, but not the page you linked. Neither can Wayback Machine. Google cache won't load it, but will load the source. There must be a problem on that page somewhere. So that's why terdon⦠thought your site was down. So did I until I checked. Hope that helps.
â DÃÂvïd
Jun 1 at 11:09
1
1
-1 for the suggestion to mix repositories meant for different Ubuntu releases without proper priority rules.
â David Foerster
Jun 7 at 10:33
-1 for the suggestion to mix repositories meant for different Ubuntu releases without proper priority rules.
â David Foerster
Jun 7 at 10:33
 |Â
show 1 more comment
up vote
0
down vote
What a great opportunity to use some docker magic!
What I did was to use a docker container running ubuntu 16.04, install pdftk
inside it and run it there.
Here are the exact steps if you want to do the same thing:
- Install docker if you don't already have it (https://docs.docker.com/install/)
- Create a directory somewhere called
pdftk
- Create a directory called
docker
inside thepdftk
directory - Copy this Dockerfile into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/docker/pdftk/Dockerfile - Copy this script also into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/scripts/dockershell - Make sure the
dockershell
script is executable - Into the
pdftk
directory, copy all the pdf files you want to work with cd /path/to/pdftk
- Run the dockershell script with the path of the Dockerfile:
docker/dockershell docker/Dockerfile
(this will take some time the very first time you run it)
Now you should have a prompt inside the docker container, from where you can run
pdftk. When you're done, type exit
to exit the container and return to the
host machine. Any newly generated files will be present in the pdftk
directory
(but they'll be owned by root, so you may need to change ownership as necessary).
add a comment |Â
up vote
0
down vote
What a great opportunity to use some docker magic!
What I did was to use a docker container running ubuntu 16.04, install pdftk
inside it and run it there.
Here are the exact steps if you want to do the same thing:
- Install docker if you don't already have it (https://docs.docker.com/install/)
- Create a directory somewhere called
pdftk
- Create a directory called
docker
inside thepdftk
directory - Copy this Dockerfile into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/docker/pdftk/Dockerfile - Copy this script also into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/scripts/dockershell - Make sure the
dockershell
script is executable - Into the
pdftk
directory, copy all the pdf files you want to work with cd /path/to/pdftk
- Run the dockershell script with the path of the Dockerfile:
docker/dockershell docker/Dockerfile
(this will take some time the very first time you run it)
Now you should have a prompt inside the docker container, from where you can run
pdftk. When you're done, type exit
to exit the container and return to the
host machine. Any newly generated files will be present in the pdftk
directory
(but they'll be owned by root, so you may need to change ownership as necessary).
add a comment |Â
up vote
0
down vote
up vote
0
down vote
What a great opportunity to use some docker magic!
What I did was to use a docker container running ubuntu 16.04, install pdftk
inside it and run it there.
Here are the exact steps if you want to do the same thing:
- Install docker if you don't already have it (https://docs.docker.com/install/)
- Create a directory somewhere called
pdftk
- Create a directory called
docker
inside thepdftk
directory - Copy this Dockerfile into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/docker/pdftk/Dockerfile - Copy this script also into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/scripts/dockershell - Make sure the
dockershell
script is executable - Into the
pdftk
directory, copy all the pdf files you want to work with cd /path/to/pdftk
- Run the dockershell script with the path of the Dockerfile:
docker/dockershell docker/Dockerfile
(this will take some time the very first time you run it)
Now you should have a prompt inside the docker container, from where you can run
pdftk. When you're done, type exit
to exit the container and return to the
host machine. Any newly generated files will be present in the pdftk
directory
(but they'll be owned by root, so you may need to change ownership as necessary).
What a great opportunity to use some docker magic!
What I did was to use a docker container running ubuntu 16.04, install pdftk
inside it and run it there.
Here are the exact steps if you want to do the same thing:
- Install docker if you don't already have it (https://docs.docker.com/install/)
- Create a directory somewhere called
pdftk
- Create a directory called
docker
inside thepdftk
directory - Copy this Dockerfile into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/docker/pdftk/Dockerfile - Copy this script also into the
pdftk/docker
directory: https://github.com/gkotian/gautam_linux/blob/master/scripts/dockershell - Make sure the
dockershell
script is executable - Into the
pdftk
directory, copy all the pdf files you want to work with cd /path/to/pdftk
- Run the dockershell script with the path of the Dockerfile:
docker/dockershell docker/Dockerfile
(this will take some time the very first time you run it)
Now you should have a prompt inside the docker container, from where you can run
pdftk. When you're done, type exit
to exit the container and return to the
host machine. Any newly generated files will be present in the pdftk
directory
(but they'll be owned by root, so you may need to change ownership as necessary).
answered Jul 14 at 21:28
![](https://i.stack.imgur.com/eames.jpg?s=32&g=1)
![](https://i.stack.imgur.com/eames.jpg?s=32&g=1)
Gautam
1012
1012
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028522%2fhow-can-i-install-pdftk-in-ubuntu-18-04-bionic%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3
and PDF Chain, too! These two tools were invaluable to me!
â Joshp.23
Apr 26 at 20:02
3
Don't just write "You can try...", explain how you do it and the steps you have to follow to make the answer more helpful
â ADDB
Apr 27 at 17:32
1
If you solved your problem yourself, please answer your own question and accept your answer. DonâÂÂt put the answer in your question or the comments! :-) I took the liberty to revert the change that added the answer but you can always review a postâÂÂs history through the link below it.
â David Foerster
Apr 27 at 21:25
5
FYI, pdftk was dropped from the repositories and there's a feature request to add it back.
â David Foerster
Apr 27 at 21:28
1
it's a shame that such a nice tool got removed just because the developers didn't find an acceptable solution
â Daniel Alder
Jul 1 at 23:16