blog.alster.space

Schnipsel from alster

Errors using convert to merge images into a single PDF

April 10, 2024 — alster

e.g. for printing

If you do run into convert.im6: cache resources exhausted the solution is to first look at which resource of ImageMagick is exhausted with convert -list resource.
OK, this doesn't tell you what is exhausted, but what the limits are, you can then edit /etc/ImageMagick-r/policy.xml as root to your needs. In my case I upped the limit for to

Then I had a second error while doing this.
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/426.
Well, this is because of a bug in ghostscript versions lower than 9.24.
Get your version with ghostscript --version or gs --version.
If your version is higher, which should be the case, you can turn off the safety for the PDF-format at least in the same file, that's mentioned above.
Search for , then go top the line which has PDF in it and comment it out like so .
This is used for commenting out stuff in XML-formats, yes, HTML is also just XML.

That's it, happy convert!

Tags: XML, GhostScript, convert, Linux, Debian, ImageMagick, Bug, PDF, png, Images