PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jun 19, 2018 10:20 am

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Mar 24, 2017 10:37 am 

Joined: Fri Mar 24, 2017 10:20 am
Posts: 1

I want to create a document with different page sizes.
I see in another post that I have to define the page setup for each section.
But in the documentviewer preview both pages have the same size (section1).

public static void Test(Document document)
var section1 = document.AddSection();
section1.PageSetup = document.DefaultPageSetup.Clone();

section1.PageSetup.PageHeight = "297mm";
section1.PageSetup.PageWidth = "190mm";

var section2 = document.AddSection();
section2.PageSetup = document.DefaultPageSetup.Clone();

section2.PageSetup.PageHeight = "190mm";
section2.PageSetup.PageWidth = "297mm";

view.preview.Ddl = DdlWriter.WriteToString(document);

Reply with quote  
PostPosted: Sat Mar 25, 2017 7:33 pm 
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 378
Location: CCAA

That's a know bug.
Please apply the fix shown here:

Best regards
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)

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