Bug 95268 - pdftoppm: X and Y scaling are swapped
Summary: pdftoppm: X and Y scaling are swapped
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
Depends on:
Reported: 2016-05-04 20:27 UTC by Jason Crain
Modified: 2018-08-21 11:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

[patch] Calculate rotation before scaling (1.43 KB, patch)
2016-05-04 20:31 UTC, Jason Crain
Details | Splinter Review

Description Jason Crain 2016-05-04 20:27:01 UTC
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.
Comment 1 Jason Crain 2016-05-04 20:31:23 UTC
Created attachment 123469 [details] [review]
[patch] Calculate rotation before scaling

This patch fixes this by moving the rotation check to before the scaling calculation.
Comment 2 GitLab Migration User 2018-08-21 11:16:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/595.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.