Can't convert PDF to images. Please help

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
kawinwara
Posts: 2
Joined: 2013-09-06T23:22:02-07:00
Authentication code: 6789

Can't convert PDF to images. Please help

Post by kawinwara »

Hello,

I've been using ImageMagick to convert pages in a PDF file to images.
I got it to work. The size of the PDF is 6MB and I got all 10 pages converted to 10 JPGs without any problem.

However when I tried to convert the bigger PDF which is 22 MB (100 pages), I got no luck at all. No image generated.
I have config php.ini so the maximum execution time is definitely enough to execute the script ( I think i set it to 20 mins or something ) but still no luck.
also config the max upload file to 100 MB but still no luck.
Let say that I have all maximum limitations in the php.ini extended to the definitely enough amount.

Please advice what should I do to be able to convert large PDF file to images.

Regards,

Kawin
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Can't convert PDF to images. Please help

Post by snibgo »

The problem might be memory or temporary file space. What resolution are you using? Calculate the total number of pixels, then 6 bytes per pixel.

If you can put the file somewhere (eg Dropbox)and post the URL here, someone might take a look.

Or you can convert page by page, eg

Code: Select all

convert in.pdf[3] out.jpg
snibgo's IM pages: im.snibgo.com
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Can't convert PDF to images. Please help

Post by glennrp »

You could try "pdfsplit" from SourceForge to split your PDF into separate pages,
then process the pages one at a time with ImageMagick. I haven't used
pdfsplit myself, but it looks like what you need.
kawinwara
Posts: 2
Joined: 2013-09-06T23:22:02-07:00
Authentication code: 6789

Re: Can't convert PDF to images. Please help

Post by kawinwara »

Thanks a lot everyone. I will give both advises a try and let you guys know if they works. :)
Thank you.
Post Reply