0

I'm running a workflow pipeline in GitHub which uses ImageMagick. When I run tests which use ImageMagick on PDF files, I get the following error:

Command failed: convert "/tmp/test.pdf[0]" "/tmp/test-0.png"
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: no images defined `/tmp/test-0.png' @ error/convert.c/ConvertImageCommand/3258.

I found the following posts which present a solution

ImageMagick security policy 'PDF' blocking conversion

https://bugs.archlinux.org/task/60580

But as this is ran in GitHub workflow, I was wondering maybe there's a simpler solution?

David Faizulaev
  • 3,385
  • 15
  • 54
  • 92
  • See also https://stackoverflow.com/questions/52861946/imagemagick-not-authorized-to-convert-pdf-to-an-image/52863413#52863413 – fmw42 Jan 10 '22 at 16:27
  • I saw it, so changing the file oa the only option then, even in GitHub. – David Faizulaev Jan 10 '22 at 17:30
  • As far as I know you have to edit the policy.xml file to enable permissions to use PDF/PS/EPS. Be sure you also have Ghostscript installed with ImageMagick – fmw42 Jan 10 '22 at 19:30

0 Answers0