PDFsharp & MigraDoc Forum
https://forum.pdfsharp.net/

Define Custom Page Size PdfSharp
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2016
Page 1 of 1

Author:  instantmaker [ Thu May 10, 2012 10:54 pm ]
Post subject:  Define Custom Page Size PdfSharp

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!!

Author:  () => true [ Fri May 11, 2012 7:46 am ]
Post subject:  Re: Define Custom Page Size PdfSharp

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/