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!
Generating Image Previews of PDF files
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Generating Image Previews of PDF files
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.
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/
https://imagemagick.org/Usage/