Convert to PDF's Last Page using GraphicsMagick with Python -


to convert range of 1st 5th page of multipage pdf single images straight forward using: convert file.pdf[0-4] file.jpg

but how convert 5th last page when dont know number of pages in pdf?

in imagemagick "-1"represents last page, so: convert file.pdf[4--1] file.jpg works, great stuff, doesnt work in graphicsmagick.

is there way of doing or need find number of pages? ps: need use graphicsmagick instead of imagemagick.

thank in advance.

future readers of this, if you're experiencing same dilemma in graphicsmagick. here's easy solution:

simply write big number represent "last page". is: like:

convert file.pdf[4-99999] +adjoin file%02d.jpg

will work convert 5th pdf page last pdf page, jpgs.

note: "+adjoin" & "%02d" have getting images rather last. you'll see mean if try it.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -