PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/801

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?".
Post Reply
ankur94
Posts: 1
Joined: 2017-07-19T21:54:34-07:00
Authentication code: 1151

PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/801

Post by ankur94 »

I am new to ImageMagick.
Currently i am using ImageMagick 7.0.6-Q16 with PHP 5.5.12 on Windows platform.
I have installed Ghostscript 9.21 but i dont know what i need to do after insatllation.
I am trying to convert PDF file to and image but it gives me this error.

Code: Select all

PDFDelegateFailed `The system cannot find the file specified.
' @ error/pdf.c/ReadPDFImage/801
I am not sure if i am follwing the write process.
Here is my code.

Code: Select all

$url= $this->CI->entutotemplateparser->get_pdf_sample_file_path() . $file_name;
$file= file_get_contents($url);
$this->CI->entutologger->write_log("FILE",$template_data["IMAGE_PATH"]);
$document = new Imagick();
$document->readimageblob($file);
$document->setresolution(480, 640);
$file= getcwd()."/data/pdf_sample/sample.jpg";
$s=$document->writeimage($file);
$this->CI->entutologger->write_log("NO.", $s);
$this->display_page("gpsdemo/home", $template_data);

I also tried converting "PNG" to "JPG" and i did it successfully but i am facing this problem while handling PDF files.
Thanks in Advance
Post Reply