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

PPA version throwing errors on --explode #33

Open grrrrr opened 5 years ago

grrrrr commented 5 years ago

OS Version

$ lsb_release -d
Description:    Ubuntu 18.04.2 LTS

Software version

$ dpkg -l | grep pdf-redact
ii  pdf-redact-tools  0.1.2-1  all  PDF Redact Tools helps with securely redacting and stripping

When using pdf-redact-tools from the ubuntu ppa by @micahflee the software will throw the same error no matter what PDF is used.

Error

pdf-redact-tools --explode Test.pdf 
Converting PDF to PNGs
convert-im6.q16: not authorized `/home/user/Downloads/Test.pdf' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `/home/user/Downloads/Test_pages/page-transparent.png' @ error/convert.c/ConvertImageCommand/3258.
Flattening PNGs
Traceback (most recent call last):
  File "/usr/bin/pdf-redact-tools", line 216, in <module>
    main()
  File "/usr/bin/pdf-redact-tools", line 188, in main
    if pdfrt.explode(achromatic):
  File "/usr/bin/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
dirk-thomas commented 5 years ago

Same for me with the .deb build locally from the current default branch.

ghost commented 5 years ago

same issue

Segerberg commented 5 years ago

This problem is probably beacuse pdf's is restricted in /etc/ImageMagick-6/policy.xml . If you comment out <!--<policy domain="coder" rights="none" pattern="PDF" />--> it should work.