#1021975 pdfsandwich: Rendered unusable by relying on convert and gs security restrictions

Package:
pdfsandwich
Source:
pdfsandwich
Description:
Tool to generate "sandwich" OCR pdf files
Submitter:
Olivier Berger
Date:
2024-12-23 18:21:02 UTC
Severity:
normal
#1021975#5
Date:
2022-10-18 07:52:49 UTC
From:
To:
Dear Maintainer,

Due to a change in permissions of GS for PDF files, pdfsandwich is unusable, as long as it relies on convert (imagemagick) which, in turns uses GS.

One gets this kind of errors :
identify-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/421
and
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/421.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907336#27 for a description of the kind of issue convert reports, unless one changes the security settnigs of GS.

It would apparently be better to make pdfsandwich rely on poppler-utils to perform the PDF to PBM image conversion, AFAIU.

Hope this helps.

Best regards,

#1021975#10
Date:
2022-10-18 08:39:09 UTC
From:
To:
It seems that the following script may be helpful, by wrapping calls to
convert, and using pdftoppm instead of convert for initial PDF opening :
https://gist.github.com/olberger/a88e3e2d4c684fdf94bbe5bc69ab9fe2

To be used with pdfsandwich -convert .../convert.sh

Hope this helps.

I think that maybe the original author should be notified, but as the
project used to live on sourceforge and seems a bit old, I'd let the
maintainer forward to the best channel.

Best regards,