3

I was trying to use ImageMagick to convert a PDF to images, but I got this error:

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/%03d.png' @ error/convert.c/ConvertImageCommand/3258.

I found a bunch of answers (like this and this) that suggests to modify the policy.xml file; my problem is, I have no idea where to find that file on WSL: I tried looking for it in /etc/, with find and searching in Windows, to no avail. Any idea how to solve this issue on WLS?

Mauro
  • 135
  • 9
  • See https://stackoverflow.com/questions/52861946/imagemagick-not-authorized-to-convert-pdf-to-an-image/52863413#52863413 – fmw42 May 30 '21 at 21:24

1 Answers1

5

You can find it like this:

identify -list configure | grep CONFIGURE_PATH

Failing that, use this search.

Failing that, use find in your WSL environment like this:

find / -name policy.xml 2> /dev/null

Failing that, just use Windows' Search to find a file calledpolicy.xml

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432