2

I'm using pdftoppm to convert PDFs to PNGs. I have played with the DPI options (-r, -rx, -ry) and increased the quality of the resultant images by increasing the DPI. I see that there is also a -scale-to option. I cannot quite figure our what it means though with

"Scales the long side of each page (width for landscape pages, height for portrait pages) to fit in scale-to pixels."

So, for example, if I use -r 450 Then I have 450 by 450 pixels in the image. If I add -scale-to 100 Will it now make the image something x 100 pixels? Or what pixels are being referred to in the scale-to option? Does it interact with -r at all? Or are they separate? Thanks.

Manual page: https://www.systutorials.com/docs/linux/man/1-pdftoppm/

Neil
  • 308

1 Answers1

5

Neil, I believe that the -r 450 sets the density, whereas the -scale-to 1920 will actually resize the image having its longest side go to 1920 pixels and the other side will also scale maintaining the aspect ratio of the image. So -r is kind of how blocky it will look, and -scale-to is how big the overall image will be (on one side).

marvin
  • 258