How to make pdftoppm produce PNGs with exact X/Y dimensions

This will produce a PDF exactly 696px wide (X dimension fixed - will keep aspect ratio)

fixed-x-dimension.sh
pdftoppm -png -scale-to-x 696

This will produce a PDF exactly 1000px high (Y dimension fixed - will keep aspect ratio)

fixed-y-dimension.sh
pdftoppm -png -scale-to-y 1000

And this will produce a PDF exactly 696px wide and 1000px high (both dimensions fixed - will not keep aspect ratio)

fixed-x-y-dimension.sh
pdftoppm -png -scale-to-x 696 -scale-to-y 1000

Check out similar posts by category: Linux, Graphics