[thelist] PDF thumbnails

Phil Turmel pturmel-webdev at turmel.org
Mon Jun 15 09:15:17 CDT 2009

Hi Robert,

Robert Vreeland wrote:
> Hello all,
> Been a while since I've posted, but here we go.
> I'm creating a jpeg thumbnail from an upload PDF using imagemagick and ghostscript on a Linux box with php 5.2.9
> Single page PDFs convert with no problems. Some multi-page PDFs work; i.e. I get a thumbnail for every page, and some don't - imagemagick/ghostscript is see the PDF as a single page and created a garbled image. I know the conversion is failing on PDFs version 4 or less and created on a Mac. I've tried doing both with and without the brackets in the exec command 
> i.e. 'exec(convert filename[0] filename)' 
> I don't believe that is the issue. So my question(s) are
> 1. Is it an issue with PDFs created on a Mac?
> 2. Is it a PDF version issue?
> 3. Anyone found a work around? I've run across a lot of post on the garbled image bit, and the consensus is to use Imagemagick with ghostscript (already doing) with the brackets (tried it).
> Thanks in advance
> Robert Vreeland
> StudioFramework

I've used pdftk, the PDF toolkit, to split PDFs by pages and perform 
various manipulations.  You might want to use it to extract page #1 from 
each PDF, and run just that through your existing process.



More information about the thelist mailing list