Error in converting a PDF file page to PPM using pdftoppm

574 Views Asked by At

I am having trouble converting a PDF file to PPM using pdftoppm.exe. The PDF file has multiple pages, and I want to convert only page 6 of the file. I have tried the following but it inexplicably fails to do the conversion:

pdftoppm "C:/Users/lenovo/Desktop/folder1/502.pdf" "C:/Users/lenovo/Desktop/folder1/502" -png -f 6

pdftoppm "C:/Users/lenovo/Desktop/folder1/502.pdf" "C:/Users/lenovo/Desktop/folder1/502" -png -f 6 -l 6

pdftoppm "C:/Users/lenovo/Desktop/folder1/502.pdf" "C:/Users/lenovo/Desktop/folder1/502" -png -f 6 -l 6 -singlepage
1

There are 1 best solutions below

0
On

After several minutes of trial and error, it appears the syntax I used was wrong. This worked for me:

pdftoppm -f 6 -l 6 "C:\Users\lenovo\Desktop\folder1\502.pdf" 502