[BNM] PDF thumbnail creation
Jay Caines-Gooby
jay at gooby.org
Tue Jul 1 10:02:04 BST 2008
On Tue, Jul 1, 2008 at 9:51 AM, Sebastian von Bischopink
<lists at allaboutseb.com> wrote:
> Dear BNM,
>
> i am working on putting together a php script that displays a list of
> pdf files in a folder on the server.
> So i thought that it would be great to display a thumb of the title
> page for each pdf -
> Does anybody know if this is possible? If so, how? I only seem to
> find tools for jpg,png etc.
>
> Thanks in advance,
imagemagick will sort you out. The basic batch conversion command is
(assuming you're in a folder full of .pdfs)
mogrify -format png *.pdf
But you'll probably want to set the size of the generated thumbs, so
something like:
mogrify -format png -resize x250 *.pdf
Will make all the thumbs 250 pixels high, with the relevant width
ratios retained (i.e. no wierd stretching).
--
Jay Caines-Gooby
jay at gooby.org
+44 (0)7956 182625
skype: jaygooby
gtalk: jaygooby at gmail.com
AIM: jaygooby
More information about the BNMlist
mailing list. Powered by Wessex Networks