3

I have a strange error in the image magick php module.

ImagickException [ 1 ]: Postscript delegate failed '/tmp/magick-XXxIARsr': wd7C.cache @ error/pdf.c/ReadPDFImage/638

From what it seems it's a problem with authorization.

I have suphp and suexec in apache. I think there is a problem with the cache path. but i changed it in the configure.xml file and the path is still the same.

Do you have any idea ?

Stéphane Goetz
  • 682
  • 1
  • 7
  • 16
  • Looks like PDF file might be broken. Do you get the same error when reading other files? – binaryLV Jun 07 '11 at 12:28
  • What exactly are you trying to achieve via PHP? Then try to construct the appropriate commandline for the PostScript delegate (which likely is Ghostscript), and run it directly against the same input file. Just to check if the real isn't with a buggy input file, or with a bug in the version of your PostScript delegate... – Kurt Pfeifle Jun 07 '11 at 14:03
  • i'm trying to extract pdf pages to make png images, here's the code : `$images = new Imagick($_SERVER['DOCUMENT_ROOT'].$pdf_file); foreach($images as $i =>$image){ $image->setImageFormat('png'); $image->contrastImage( 1 ); $image->sharpenImage( 2,1 ); $image->scaleImage(0, 800); $image->writeImage($save_path.$i.'.png'); $picture_path[] = $filename.'-'.$i.'.png'; }` – Stéphane Goetz Jun 08 '11 at 09:06

1 Answers1

2

"delegates" in Imagick-speak are just programs that imagick starts to deal with some file formats it cannot process on its own. As in your case - imagick does not have a built-in PDF reader, it relies on GhostScript (I believe) to render those. Most likely you either don't have GhostScript/GhostView installed or there is some problem in the PDF that freaks out GhostScript - such as using non-embedded windows fonts.

m1tk4
  • 3,439
  • 1
  • 22
  • 27