Page 1 of 1

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

Posted: 2017-07-19T22:05:10-07:00
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