Page 1 of 1

Some PDF-files get stuck on readImage()

Posted: 2014-03-11T08:59:11-07:00
by skogga
I've got problems with some of our PDF-files (approx. 1 out of 30), that just get stuck on "readImage", it stays there until I close the process or the script times out.

The trouble seems to have some connection to the CMYK colorspace as it doesn't occur when using standard RGB and it only occurs when going through the PHP-addon.

I've spent weeks trying to solve this, but the the biggest problem is that it won't give me any error messages to go for.

Here's some of the troubling files,
http://feedr.se/upload/PDFFiles.zip

Ghostscript version: 9.10
Imagick: 6.8.7-0 2013-09-18 Q16 (32-bit)

System: Windows Server 2008 (32-bit), 4GB RAM
Using PHP 5.4 (Imagick 3.1.2, Non-Thread-Safe, 32-bit)

Code: Select all

$im = new Imagick();
$im->setColorspace( imagick::COLORSPACE_CMYK ); // <-- If I change this line to SRGB most of the files start working, but with the wrong colors
$im->setResolution( 144, 144 );
$im->readImage('pdffile.pdf[0]'); // <-- This is where it get stuck

// and some more code...
Thanks in advance.

Re: Some PDF-files get stuck on readImage()

Posted: 2014-03-11T12:38:10-07:00
by dlemstra
There have been some bug reports with Ghostscript getting stuck on some files. They are aware of this issue and it should be solved in the next release. Maybe you could try and see if downgrading your version resolves the issue. I have no clue when they will publish a new release.

Re: Some PDF-files get stuck on readImage()

Posted: 2014-03-12T02:54:23-07:00
by skogga
Thanks, I will try that.

Re: Some PDF-files get stuck on readImage()

Posted: 2014-03-27T01:26:55-07:00
by skogga
The problem got solved with release 9.12 of GhostScript, that was released just a couple of days ago. =)

Re: Some PDF-files get stuck on readImage()

Posted: 2014-03-27T03:13:19-07:00
by dlemstra
Thank you for getting back to us. I can see that Ghostscript 9.14 is available now also. I hope it is still fixed :)