firstlookmedia / pdf-redact-tools

a set of tools to help with securely redacting and stripping metadata from documents before publishing
Other
533 stars 48 forks source link

After migrating from debian to LinuxMint and reinstalling, it doesn't work any more #32

Closed Wikinaut closed 5 years ago

Wikinaut commented 5 years ago

./pdf-redact-tools -e 1.pdf

convert-im6.q16: not authorized `/usr/local/src/pdf-redact-tools/1.pdf' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `/usr/local/src/pdf-redact-tools/1_pages/page-transparent.png' @ error/convert.c/ConvertImageCommand/3258.
Flattening PNGs
Traceback (most recent call last):
  File "./pdf-redact-tools", line 221, in <module>
    main()
  File "./pdf-redact-tools", line 193, in main
    if pdfrt.explode(achromatic):
  File "./pdf-redact-tools", line 101, in explode
    filename_template = os.path.join(self.pages_dirname, filenames[0].replace('-0.png', '-{}.png'))
IndexError: list index out of range
Wikinaut commented 5 years ago

Solution:

sudo sed -i '/PDF/s/none/read|write/' /etc/ImageMagick-6/policy.xml

Source: https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-error-constitute-c-readimage-453