PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Wed Dec 03, 2025 6:14 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu May 10, 2012 10:54 pm 
Offline

Joined: Thu May 10, 2012 10:28 pm
Posts: 1
I am new to PdfSharp and I am wondering if this library supports custom paper sizes?
I have searched the forum and find very limited info, and some of them is not relevant.

What I need to have is a custom page size that are not in the list of Enums and wonder how I can do that. For example I want to define the page size based on an image I supply to the page. Any info would be greatly appreciated.

Thanks so much for your help!!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 11, 2012 7:46 am 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 355
I haven't tried it but I guess you have to set the MediaBox directly, not the Size (the Size property sets the MediaBox based on the enum value).
instantmaker wrote:
For example I want to define the page size based on an image I supply to the page.
If there are many pictures in the file (many = more than three) then it might be more comfortable for the viewer to have the images scaled to a standard page size.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


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

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider] and 291 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