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 ?

3
  • Looks like PDF file might be broken. Do you get the same error when reading other files? Commented Jun 7, 2011 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... Commented Jun 7, 2011 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'; } Commented Jun 8, 2011 at 9:06

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.