Input page number => Output Filename
Posted: 2009-02-11T01:47:34-07:00
Hi,
Due to the resource demands of converting a large PDF file to JPG (changing the volume for temporary files as well: set MAGICK_TMPDIR=y:\) I've split it into 100 pages at a time so for example:
As you can see, I will end up with 'n' thumbs directories each with 100 files called example-0.jpg to example-99.jpg.
I searched and found the following example which could dynamically write the width/height of an image to the file name:
After ferreting some more I have not yet found it possible to copy the input page number to an output name of the file. It would be similar to:
convert -limit memory 32mb -limit map 64mb -density 300 -thumbnail 93x131 example.pdf[100-199] -set filename:pg "%p" thumbs\example-%[filename:pg].jpg
I assume this functionality either doesn't exist, or spending the last 1.5 hours was insufficient to investigate the problem .
Cheers!
Due to the resource demands of converting a large PDF file to JPG (changing the volume for temporary files as well: set MAGICK_TMPDIR=y:\) I've split it into 100 pages at a time so for example:
Code: Select all
convert -limit memory 32mb -limit map 64mb -density 300 -thumbnail 93x131 example.pdf[0-99] thumbs\example.jpg
convert -limit memory 32mb -limit map 64mb -density 300 -thumbnail 93x131 example.pdf[100-199] thumbs100\example.jpg
I searched and found the following example which could dynamically write the width/height of an image to the file name:
Code: Select all
convert rose: -set filename:area "%wx%h" 'rose-%[filename:area].png'
After ferreting some more I have not yet found it possible to copy the input page number to an output name of the file. It would be similar to:
convert -limit memory 32mb -limit map 64mb -density 300 -thumbnail 93x131 example.pdf[100-199] -set filename:pg "%p" thumbs\example-%[filename:pg].jpg
I assume this functionality either doesn't exist, or spending the last 1.5 hours was insufficient to investigate the problem .
Cheers!