Search found 2 matches

by Peter3818
2017-08-17T04:06:50-07:00
Forum: IMagick
Topic: Converting a multi-page pdf to multiple JPG images with Imagick and PHP
Replies: 2
Views: 7013

Re: Converting a multi-page pdf to multiple JPG images with Imagick and PHP

Thank you, snibgo. It was a memory problem. I changed the code to: $im = new imagick($uploadfile); $pages = $im->getNumberImages(); if ($pages < 3) { $resolution = 600; } else { $resolution = floor(sqrt(1000000/$pages)); } $imagick = new imagick(); $imagick->setResolution($resolution, $resolution); ...
by Peter3818
2017-08-16T11:47:33-07:00
Forum: IMagick
Topic: Converting a multi-page pdf to multiple JPG images with Imagick and PHP
Replies: 2
Views: 7013

Converting a multi-page pdf to multiple JPG images with Imagick and PHP

I have a small script for creating jpg images from an uploaded multi-paged pdf file ($uploadfile) with Imagick: $imagick = new imagick(); $imagick->setResolution(600, 600); $imagick->readImage($uploadfile); $imagick->setImageFormat('jpg'); $pages = (int)$imagick->getNumberImages(); foreach($imagick ...