Search code examples
graphicsmagick

graphicsmagick 1.3.16 how to conver all pages?


with gm 1.3.12 its easy

gm convert pdf:in.pdf jpeg:out.jpeg

results in

out.jpeg.0
out.jpeg.1
out.jpeg.2 
etc..

with 1.3.16

gm convert pdf:in.pdf jpeg:out.jpeg

generate out.jpeg only (1st page from in.pdf)

gm convert pdf:in.pdf[2] jpeg:out.jpeg

e.g. nicely outputs 2nd page from pdf.

despite heavy searching I cannot seem to find how make 1.3.16 gm output all pages from pdf with one single command ( as it works in 1.3.12 ).

Thanks in advance.


Solution

  • Try this command:

    gm convert pdf:in.pdf +adjoin jpeg:out.jpeg.%01d
    

    (tested with GraphicsMagick 1.3.18)