[PdfToPpm] Add an option to scale before rotate
(I propose a new solution to be backwards-compatible with the swap between height and width with 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
- We use the options: -scale-to-y 50 -scale-to-x -1
- The generated image has width=50 and height=25
- But with this option the expected sizes are width=100 and height=50
I found a correction in pdftoCairo.cc and an issue #595.
I propose another solution to solve this problem with a new option to select the good timing to swap height and with.
By default we keep the original order : Resize and swap if the option is activated the order become: Swap and resize
For the test I attached a pdf sample. rotated.pdf
Merge request with other solution: