Kalpit
Kalpit

Reputation: 1101

pdftoppm converts only one first page of pdf

I need to convert pdf to pgm, and when I run the (example)command

pdftoppm -f 5 -l 10 -gray input.pdf > output.pgm

I am getting the first page of the pdf as output. This is even though I am clearly specifying first page as page 5. I am not specifying -singlefile parameter, that could cause this. Even when I specify a single page, like

pdftoppm -f 5 -l 5 -gray input.pdf > output.pgm

, the first page is converted. Any pointers?

Upvotes: 2

Views: 1935

Answers (1)

snail-on-a-quest
snail-on-a-quest

Reputation: 16

in your case use pdftoppm thusly:

pdftoppm -gray input.pdf your-output-prefix

it creates files your-output-prefix-X.pgm for every page number X.

Upvotes: 0

Related Questions