gscan2pdf v2.5.1; OS: Mint 18.3.
Full text of error message on startup: "pdftk is installed, but cannot access the directory used for temporary files.One reason for this might be that pdftk was installed via snap.In this case, removing pdftk, and reinstalling without using snap would allow gscan2pdf to use pdftk. Another workaround would be to select a temporary directory under your home directory in Edit/Preferences."
Followed by a second message: "Warning: missing packages
PDF encryption requires pdftk."
Directory for temporary files is set to /tmp, which has standard ownership and permissions:
drwxrwxrwt 17 root root 4096 Apr 11 16:25 /tmp
I haven't had this error with previous versions of gscan2pdf ( last in use was v2.1.2 ). pdftk (v2.02) was not installed by snap.
I should have added that pdf documents can still be saved, but conversion from the internal format takes a long time.
gscan2pdf2.5.1 , Mint 19.1
This error is actually not due a problem with either the '/tmp' directory or with the 'pdftk' utility, but is instead because of an ImageMagick security policy implemented by Mint & its parent Ubuntu, so for me at least designating an alternate temporary directory does not work. Here's my analysis & work-around:
<policy domain="coder" rights="none" pattern="PDF" />which prohibits the PDF conversion.This is all because of security concerns for ImageMagick which are documented at 'https://www.enisa.europa.eu/publications/info-notes/what2019s-behind-imagemagick-vulnerability'.
Last edit: Michael Blum 2019-04-15
Thanks, Michael. It hadn't occurred to me that the problem might be creating the PDF with imagemagick. Now I can reproduce the issue, too.
I'll test for pdftk by creating a tiff with imagemagick, and converting to pdf with tiff2pdf.
This will fix the problem for the next release.
Thanks Michael. An excellent analysis. Your suggested workround solved the immediate problem for me, And thanks, Jeffrey, for finding a fix for the next release. I find gscan2pdf soooo useful.