In a system I'm working on we're generating thumbnails as part of the workflow. Sometimes the pdf files are quite large (print size 3m2) and can contain huge bitmap images.
Are there thumbnail generation capable programs that are optimized for memory footprint handling such large pdf files?
The resulting thumbnail can be png or jpg.
ImageMagick is what I use for all my CLI graphics, so maybe it can work for you:
This produces three separate PNG files:
To create only one thumbnail, treat the PDF as if it were an array (
[0]
is the first page,[1]
is the second, etc.):Since you're worrying about memory, with the
-cache
option, you can restrict memory usage:So to thumbnail a PDF file and resize it,, you could run this command which should have a max memory usage of around 20mb:
Or you could use
-density
to specify the output density (900 scales it down quite a lot):Should you care? Current affordable servers have 512 GB ram. That supports storing a full colour uncompressed bitmap of over 9000 inches (250 m) square at 1200 dpi. The performance hit you take from using disk is large.