2

Since some time (possibly a month or two), pdftk stopped working on my system (Ubuntu 18.04, AFAIK all latest updates applied).

I now unconditionally get the error Error: Unable to find file:

pdftk A=file1.pdf B=file2.pdf cat A1 B2 output file3.pdf
Error: Unable to find file.
Error: Failed to open PDF file: 
   file1.pdf
Error: Unable to find file.
Error: Failed to open PDF file: 
   file2.pdf
Errors encountered.  No output created.
[···]$ ls -lh file*pdf
-rw-rw-r-- 1 cal cal 139K Oct  3 12:30 file1.pdf
-rw-rw-r-- 1 cal cal 139K Oct  3 12:30 file2.pdf
[···]$ file file*pdf
file1.pdf: PDF document, version 1.5
file2.pdf: PDF document, version 1.5

If I type evince file1.pdf, the PDF viewer opens and I see the file. The file is there and is accessible (it is owned by the same user cal, there are no permissions issues, etc.).

I ran the above command as root (both as sudo pdftk ... and sudo -i to login as root, then navigated to cal's directory and re-ran the pdftk command; exactly the same error messages in all cases)

Any ideas?

[EDIT]:
The problem seems to be related to user-specific settings. I copy the files to a different user's directory (adjusting ownsership, etc.), and the same command works over there. I ran env on both, and compared. Naturally, there are many differences (I mean in addition to the obvious ones such as HOME, PATH, PWD). I've tried setting env variables on the problematic user with the same value from the given env variable on the non-problematic user (for several variables that sounded like could be the culprit), but it still doesn't work.
[END EDIT]

Cal-linux
  • 129

0 Answers0