PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue May 23, 2017 3:13 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 
Offline

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

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);


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

Joined: Sat Mar 14, 2015 10:15 am
Posts: 229
Location: CCAA
Hi!

That's a know bug.
Please apply the fix shown here:
viewtopic.php?p=10635#p10635

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


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: Bing [Bot] and 12 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:  
Powered by phpBB® Forum Software © phpBB Group