Search found 4 matches

by harold
2018-08-28T16:42:00-07:00
Forum: Bugs
Topic: PHP call to readImage Exception ReadPDFImage/664 Failed
Replies: 8
Views: 6224

Re: PHP call to readImage Exception ReadPDFImage/664 Failed

I have tested multiple PDF files each with over 20 pages. They all fail on the readImage[X] command. Bear in mind this is running in PHP from a shared hosting account so I do not have a Command line environment to run a convert command. To clarify, the entire script consists of only two lines. It is...
by harold
2018-08-25T16:36:20-07:00
Forum: Bugs
Topic: PHP call to readImage Exception ReadPDFImage/664 Failed
Replies: 8
Views: 6224

Re: PHP call to readImage Exception ReadPDFImage/664 Failed

Just these two line of code alone will cause the exception so there is never a chance to free any memory. I tried changing the memory_limit assigned to PHP, but that doesn't seem to have an affect. It seems that when you are reading a page that is far enough into the PDF file, it gets the exception....
by harold
2018-08-25T14:01:33-07:00
Forum: Bugs
Topic: PHP call to readImage Exception ReadPDFImage/664 Failed
Replies: 8
Views: 6224

Re: PHP call to readImage Exception ReadPDFImage/664 Failed

Perhaps my goal description was unclear. I have a 20 page PDF file and I want to extract out 20 individual JPG files (one for each page). Each page is essentially a big image. The code above works for the first X pages, then fails with an exception. I'm trying to extract pages 0 to 19.
by harold
2018-08-25T09:29:18-07:00
Forum: Bugs
Topic: PHP call to readImage Exception ReadPDFImage/664 Failed
Replies: 8
Views: 6224

PHP call to readImage Exception ReadPDFImage/664 Failed

My goal is to extract about 30 JPG or PNG images from a PDF using PHP. I'm using ImageMagick 6.9.4 from PHP 7.1.8 in a shared hosting account using this code to extract one specific image: $imagick = new Imagick(); $imagick->readImage(bound.pdf[0]); $imagick->setImageFormat("jpeg"); $imagick->writeI...