PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 10:25 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Jul 15, 2023 9:59 am 
Offline

Joined: Fri Jul 14, 2023 5:29 pm
Posts: 1
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/574e918706778a37d2783a3c55dd632d

It'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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 383 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group