PDF to JPG conversion?

See all posts Reply

PDF to JPG conversion? new!
by Bill Posters, 15 years, 8 months ago
Can Verot's upload.class.php handle conversion of an uploaded PDF to JPG?

PDFs upload fine, but the conversion attempt is failing, producing a jpg of 0 dimensions.Reply
Re: PDF to JPG conversion? new!
by Bill Posters, 15 years, 8 months ago
After some Googling, it seems that I may need ImageMagick and GhostScript installed on my PHP host server.

So, alternatively, how would I integrate the ImageMagick/GhostScript process into a script which is otherwise based on Verot's upload class?

i.e. Between…
$handle = new upload($_FILES['img_src']);
$handle->allowed = array('application/*','image/*');
if ($handle->uploaded) {
	…
}

Many thanks for any help.Reply
Re: PDF to JPG conversion? new!
by colin, 15 years, 8 months ago
No, the class can't handle PDF to JPEG conversion.Reply
Re: PDF to JPG conversion? new!
by Bill Posters, 15 years, 8 months ago
So, how might I go about integrating ImageMagick/GhostScript into my Verot-backed upload script?

Again, many thanks for any info.Reply
Re: PDF to JPG conversion? new!
by colin, 15 years, 8 months ago
You may upload your file through the upload class, as a regular file, and store it on the server. Then, you use GS or IM to transform that file from PDF to JPEG. Eventually, you can work on the resulting image with the class again, as the class can work on local files, and process the JPEG image you created from the PDF.Reply
Re: PDF to JPG conversion? new!
by ihsan, 9 years, 10 months ago
Yes PDF to JPG Convert Problem!Reply
Re: PDF to JPG conversion? new!
by colin, 9 years, 10 months ago
The class cannot convert PDF to images. You may want to use imagemagick for that.Reply