Skip to content

[PdfToPpm] Fix the swap between -scale-to-x -scale-to-y with rotated PDF

Hello,

I think I find an issue in pdftoppm.

For a rotated pdf, options -scale-to-y and -scale-to-x are swapped:

For example with a rotated pdf x=200 y=100

  1. We use the options: -scale-to-y 50 -scale-to-x -1
  2. The generated image has width=50 and height=25
  3. But with this option the expected sizes are width=100 and height=50

I found the same correction in pdftoCairo.cc and an issue #595 (closed).

I hope my analysis are right and i don't break a real functionality.

For the test I attached a pdf sample. rotated.pdf

Edited by corentinfoucault

Merge request reports