thank you for great library and samples.
I tried using TwoPagesOnOne example in my project and found two issues.
We receive PDF with multiple pages that can have different orientation each and to spice things up can have different paper size (different aspect ratio).
Example pages in order: A4 portrait, A4 landscape, A6 portrait, A5 landscape, A4 landscape, 100x170mm portrait (all in one source document).
Original sample does not generate good output from source pages that are landscape (pages are stretched and squished to portrait aspect ratio).
Additionally (connected to the first issue) pages are scaled without keeping aspect ratio of original page.
I've modified example to support such cases - if you'd like to use it, add it to samples, simply give some advice or constructive criticism feel free to do so.
Sample is posted as github gist
https://gist.github.com/sq5gvm/574e918706778a37d2783a3c55dd632dIt's probably not perfect quality code and could be optimised (I'm not an c# developer by trade) but it "works for me" without problems (processed over 2k input pages).
Have a nice day
Miroslaw