0

I am using App Engine Standard. Since ImageMagick is available on it, I tried a few PDF manipulation libraries and basically, what I would like to do, is simply converting a PDF into an image.

The issue I am getting is this:

'convert-im6.q16: not authorized /tmp/ygM1sF-Txq00JkGbpal8YWBQ.pdf\' @ error/constitute.c/ReadImage/412.\nconvert-im6.q16: no images defined/tmp/ygM1sF-Txq00JkGbpal8YWBQ-0.png\' @ error/convert.c/ConvertImageCommand/3258.\n' }

After some research, I found out that post here: Fix for ImageMagick convert errors with pdf files. Here is what he says:

PDF files on Linux systems are usually handled by ghostscript (via the terminal command gs). And, ImageMagick (done through the terminal convert command) uses ghostscript for reading and writing PDF files. Because the security problems are serious and numerous, ImageMagick’s access to PDF files is then cut off.

Granted, through these security flaws in PDF someone could craft a malicious image file that, when converted by ImageMagick into a PDF, will then do very nasty things to your computer.

But, ghostscript has since been updated once and once again with security fixes. How about a fix for ImageMagick to get PDF functionality back? Or, at least an explanation of progress towards fixing this issue?

I can't change the ImageMagick configuration on App Engine Standard, but I wonder if there is something else I can do. Or maybe the engineers at Google would be able to update ImageMagick instead and remove that limitation?

I really need to convert PDF into images, so I wonder if it worth waiting, or if I need to find another solution.

Thanks for your ideas.

TigrouMeow
  • 3,669
  • 3
  • 27
  • 31
  • possible duplicate question. check a similiar answer and full explanation of it [here](https://stackoverflow.com/questions/55484465/cant-load-pdf-with-wand-imagemagick-in-google-cloud-function/55485377#55485377). Also, this [question](https://stackoverflow.com/questions/57525653/issue-processing-pdfs-through-imagemagick-library-on-app-engine-standardsecond) also would be helpful. – Methkal Khalawi Nov 22 '19 at 12:47
  • @MethkalKhalawi Indeed, those are issues with the same origin. However, one is using Python, and the other one provides how to go through this with App Engine Flex. There is still no way of resolving this issue. The current question is easy to find through Google for that specific issue, and hopefully, it will attract more users with the issue and... solutions as well :) – TigrouMeow Nov 23 '19 at 02:07
  • I think a workaround for this issue would be rollback to previous version for ImageMagick. However, I don't recommend it due to the security issue in ImageMagic that you have mentioned. – Methkal Khalawi Nov 25 '19 at 08:52
  • Does this answer your question? [ImageMagick not authorized to convert PDF to an image](https://stackoverflow.com/questions/52861946/imagemagick-not-authorized-to-convert-pdf-to-an-image) – kenorb Jul 14 '20 at 16:08

0 Answers0