PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Apr 28, 2024 1:47 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: Thu Aug 27, 2009 7:45 pm 
Offline

Joined: Thu Aug 27, 2009 7:19 pm
Posts: 1
I have a document I'm creating that has multiple pages. Is it possible to have different page margins on different pages? When I set it on one page it changes the margin on all pages. I'll try to include a striped down sample below.


Code:

Document document = new Document();

Section section = document.AddSection();
           
Paragraph paragraph = section.AddParagraph("test" );

// page 2
section.AddPageBreak();
section.PageSetup.LeftMargin = 40;

paragraph = section.AddParagraph("page 2 ");           



Do I have to set the margins after every page break? If so what are the default settings?

Thanks for any insight.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 31, 2009 7:03 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
You set the margins for the section.

Start a new section if you have to change page margins (or use paragraph margins).

_________________
Regards
Thomas Hoevel
PDFsharp Team


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: Google [Bot] and 212 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