pdftoppm: X and Y scaling are swapped
Submitted by Jason Crain
Assigned to poppler-bugs
Description
A similar bug for pdftocairo was fixed in bug #94655. The ZIP archive in that bug (https://bugs.freedesktop.org/attachment.cgi?id=122468) has two files, good.pdf and bad.pdf.
Running the following command:
pdftoppm -png -singlefile -f 1 -scale-to-x 1275 -scale-to-y 1650 bad.pdf bad
creates a 1651 x 1275 png image. With those -scale-to-x/y arguments, it should be 1275 x 1651. The x and y scaling gets swapped because the PDF is internally rotated. The page dictionary specifies /Rotate 270.