Page 1 of 1

Generating Image Previews of PDF files

Posted: 2011-02-16T21:40:25-07:00
by mike634
I'm currently using ImagicK + GhostScript to generate preview images for my PDF files.

The problem is, in order to get good quality preview images I'm having to supersample so much it's taking over 30 seconds to process one page on my box.

Is there some method of creating good quality (so text is readable) PDF previews without having to supersample so much?


Thanks!

Re: Generating Image Previews of PDF files

Posted: 2011-02-17T16:27:42-07:00
by anthony
Really it depends on just how big you want your previews.

There should be other ways of generating them. But they will involve more direct use of ghostscript rather than using IM as a wrapper (a slow one at that due to security handling) for ghostscript.

As such I recommend you look at generating your previews using ghostscript, any raster image format, and then use IM to convert that to whatever image format you need.

An example of doing this (starting point only) is provided at the end of the 'text, postscript to image' section of IM examples...
http://www.imagemagick.org/Usage/text/#ghostscript

Remember in ghostscript PS and pdf files are both handled in basically the same way.