following the simple instructions in this answer: https://askubuntu.com/a/1048975 I installed pdftk as a snap on an ubuntu 18.04 VM. (we need some of the advanced features of pdftk on the command line like fill_forms ).
my problem: the command seems to be only half installed:
/some/path # pdftk
-> Usage:
pdftk <command>
Install, configure, refresh and remove snap packages. Snaps are
'universal' packages that work across many different Linux systems,
enabling secure distribution of the latest apps and utilities for
cloud, servers, desktops and the internet of things.
This is the CLI for snapd, a background service that takes care of
snaps on the system. Start with 'snap list' to see installed snaps.
Available commands:
< long list of snap commands >
so it seems to me as if 'pdftk' is registered as a tool in the bash, but if I try to use any of the usual pdftk commands, I get an error message like this:
pdftk forms/Form_FM.pdf fill_form /tmp/adsh/2017-4_1532602497.fdf output /some/path/2017-4_KF.pdf
-> error: unknown command forms/Form_FM.pdf, see 'snap help'
(this also happens with every other command I tried) so, how do I pass the commands and parameter to pdftk without snap trying to grab the parameter for itself?
edit: some diagnostics:
ls -l /usr/local/bin/pdftk
lrwxrwxrwx 1 root root 28 Jul 11 18:17 /usr/local/bin/pdftk -> /snap/bin/pdftk-smoser.pdftk
snap list pdftk
error: no matching snaps installed
snap list pdftk-smoser
Name Version Rev Tracking Developer Notes
pdftk-smoser 2.02-4 18 stable smoser -
hmmm...seems like I followed the older version of the answer, which had an additional step that symlinked /snap/bin/pdftk-smoser.pdftk to /usr/local/bin/pdftk
snapcommand (but with the command namepdftk), rather than that of thepdftkcommand itself - I wonder what could have gone wrong? Did you by any chance make a symbolic link? – steeldriver Jul 26 '18 at 12:02type -a pdftkplease? – steeldriver Jul 26 '18 at 12:13pdftk is /usr/local/bin/pdftkyes, I am wondering too. first time I use a snap, the examples seemed just so simple... – cypherabe Jul 26 '18 at 13:18/usr/local/bin/pdftkis a symbolic link to/usr/bin/snap(which should work, provided the pdftk snap is present). Please [edit] your question to includels -l /usr/local/bin/pdftkandsnap list pdftk– steeldriver Jul 26 '18 at 13:31pdftkand/snap/binhas been part of the default UbuntuPATHfor some time now - I suggest you remove both the symlink and thepdftk-smosersnap andsnap install pdftkinstead – steeldriver Jul 26 '18 at 14:48