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
-cacheoption, 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
-densityto specify the output density (900 scales it down quite a lot):