Pdftoppm -Scale-to Option

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:

1 Answer

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest