Another "convert: no images defined" error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Nutria
Posts: 2
Joined: 2019-01-08T13:22:04-07:00
Authentication code: 1152

Another "convert: no images defined" error

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Another "convert: no images defined" error

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Another "convert: no images defined" error

Post by fmw42 »

Nutria
Posts: 2
Joined: 2019-01-08T13:22:04-07:00
Authentication code: 1152

Re: Another "convert: no images defined" error

Post 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" />
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Another "convert: no images defined" error

Post by fmw42 »

That should be correct.
Post Reply