[PdfToPpm] Fix the selected dimension to size with swap
(I have a bug with my last branch and I need to recreate this merge request)
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
- 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 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
Comment of the old merge request:
Maybe I'll submit another merge request with the same modification to pdftocairo.cc
Oliver Sander
Can you change this to use std::swap?
corentinfoucault
I add a new commit with std::swap.
An other solution can be found here: !384 (merged)