convert hangs on converting pdf to jpg

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?".
rossigee
Posts: 1
Joined: 2015-04-22T16:40:09-07:00
Authentication code: 6789

Re: convert hangs on converting pdf to jpg

Post by rossigee »

This still appears to be an issue. I have several rogue PDF files that cause convert to hang, but not if I manually run the 'gs' that is spawned without the following argument...

-dGraphicsAlphaBits=4

Can anyone point me to the bugtracker issue that claims this is resolved, so I can follow it or add further details/examples to it?

The weird thing about this is that it works fine on my laptop, but not on our production server (an Amazon EC2 instance), which eventually queues up tons of 'gs' processes until I log on and manually kill them off. Both are running fully updated versions of Ubuntu 14.04, same architecture.

ii ghostscript 9.10~dfsg-0ubuntu10.2 amd64 interpreter for the PostScript language and for PDF
ii imagemagick 8:6.7.7.10-6ubuntu3 amd64 image manipulation programs
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert hangs on converting pdf to jpg

Post by fmw42 »

try GS 9.15 or 9.16. This issue sounds familiar or similar to one that was solved by upgrading GS. Also 6.7.7.10 is over 200 versions old, so you might want to upgrade IM as well.

see viewtopic.php?f=3&t=27419
vfranchi
Posts: 4
Joined: 2015-07-30T07:34:51-07:00
Authentication code: 1151

Re: convert hangs on converting pdf to jpg

Post by vfranchi »

I'm having the exactly same problem. If I run gs command directly on shell without the -dGraphicsAlphaBits=4 parameter, it works fine. It is also working with -dGraphicsAlphaBits=1.

-dGraphicsAlphaBits=2 and -dGraphicsAlphaBits=4 hangs Ghostscript.

I am using Ghostscript 9.21 and Imagemagick 6.7.7-10.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert hangs on converting pdf to jpg

Post by fmw42 »

ImageMagick 6.7.7.10 is ancient (over 200 versions old). You might try upgrading. Or just modify the delegates.xml file for PS to include the Ghostscript options you use when running Ghostscript manually.

You could post one of your PDF file that you are having difficulty with to some free hosting service and put the URL here and we can test with a more current version of IM and Ghostscript.
Post Reply