Page 1 of 1

Another "convert: no images defined" error

Posted: 2019-01-08T13:31:16-07:00
by Nutria
Hi,

Code: Select all

$ convert output.pdf foo.jpg
convert: not authorized `output.pdf' @ error/constitute.c/ReadImage/412.
convert: no images defined `foo.jpg' @ error/convert.c/ConvertImageCommand/3210.

Code: Select all

$ convert -version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib

Code: Select all

$ gs --version
9.26
This is Xubuntu 16.04.

https://www.imagemagick.org/discourse-s ... hp?t=32267 seems to be a similar problem, and a respondent asks if ghostscript is installed. I do have gs installed.

Is there some other library that I'm missing?

Thanks.

Re: Another "convert: no images defined" error

Posted: 2019-01-08T13:46:17-07:00
by snibgo
Always read the first error message.
Nutria wrote:not authorized `output.pdf'
That means you are not authorized to rasterize PDF files. I suggest you edit your policy.xml.

Re: Another "convert: no images defined" error

Posted: 2019-01-08T13:46:49-07:00
by fmw42

Re: Another "convert: no images defined" error

Posted: 2019-01-08T15:16:24-07:00
by Nutria
Thanks. Based on one of the comments, in /etc/ImageMagick-6/policy.xml I changed this:
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
to this:
<policy domain="coder" rights="read|write" pattern="PS" />
<policy domain="coder" rights="read|write" pattern="EPS" />
<policy domain="coder" rights="read|write" pattern="PDF" />
<policy domain="coder" rights="read|write" pattern="XPS" />

Re: Another "convert: no images defined" error

Posted: 2019-01-08T15:42:00-07:00
by fmw42
That should be correct.