Generating Image Previews of PDF files

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
mike634
Posts: 3
Joined: 2010-11-14T16:23:58-07:00
Authentication code: 8675308

Generating Image Previews of PDF files

Post 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!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Generating Image Previews of PDF files

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply