{"id":476,"date":"2014-02-27T15:38:52","date_gmt":"2014-02-27T20:38:52","guid":{"rendered":"http:\/\/devolve.net\/blog\/?p=476"},"modified":"2014-10-23T13:40:06","modified_gmt":"2014-10-23T17:40:06","slug":"multi-page-pdf-to-multiple-images","status":"publish","type":"post","link":"https:\/\/www.devolve.local\/multi-page-pdf-to-multiple-images\/","title":{"rendered":"Multi-page PDF to multiple images"},"content":{"rendered":"
convert multiple_pages.pdf +adjoin broken_up_%d.jpg<\/pre>\n

Prefix that with gm<\/code> if you’re running GraphicsMagick rather than ImageMagick. <\/p>\n

The %d<\/code> part means that a number should be placed there to indicate the page number from the original that the image file contains. So a three-page PDF will produce <\/p>\n

broken_up_0.jpg\r\nbroken_up_1.jpg\r\nbroken_up_2.jpg<\/pre>\n

You can get a better default sort order on the files by telling *magick to zero-prefix the number with a slight change to the format string. So changing %d<\/code> to %03d<\/code> will starting numbering at 000<\/code>.<\/p>\n

You should be able to generate any image file type that *magick supports by just specifying the destination extension (jpg, png, gif, etc.).<\/p>\n","protected":false},"excerpt":{"rendered":"

convert multiple_pages.pdf +adjoin broken_up_%d.jpg Prefix that with gm if you’re running GraphicsMagick rather than ImageMagick. The %d part means that a number should be placed there to indicate the page number from the original that the image file contains. So a three-page PDF will produce broken_up_0.jpg broken_up_1.jpg broken_up_2.jpg You can get a better default sort […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[34],"_links":{"self":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/476"}],"collection":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/comments?post=476"}],"version-history":[{"count":1,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/476\/revisions"}],"predecessor-version":[{"id":477,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/476\/revisions\/477"}],"wp:attachment":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/media?parent=476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/categories?post=476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/tags?post=476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}