PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Oct 31, 2024 11:31 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Aug 06, 2014 3:44 pm 
Offline

Joined: Wed Aug 06, 2014 3:39 pm
Posts: 4
I've created an extremely simplified example. Shouldn't the following put different headers on the first and subsequent pages? The following code puts the text "firstpage" on all pages.

Code:
section.PageSetup.DifferentFirstPageHeaderFooter = true;
section.Headers.FirstPage.AddParagraph("firstPage");
section.Headers.Primary.AddParagraph("everyOtherPage");


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2014 4:19 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3111
Location: Cologne, Germany
I don't see code that creates any pages. Could you provide an SSCCE?

DifferentFirstPageHeaderFooter works in our applications.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 06, 2014 5:14 pm 
Offline

Joined: Wed Aug 06, 2014 3:39 pm
Posts: 4
Sorry about that. As I created an SSCCE I found that I was creating a new section. It suddenly made sense that headers & footers would be unique to each section. Instead of adding a new section, I added a new page and everything worked as expected.

For complete newcomers the sample code is a bit confusing as it doesn't really explain how a new section differs from a new page.


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 07, 2014 8:52 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3111
Location: Cologne, Germany
bsee wrote:
For complete newcomers the sample code is a bit confusing as it doesn't really explain how a new section differs from a new page.
MigraDoc is much like Word. If you know how to create good Word documents, then you can easily create good MigraDoc documents.

Difficult to explain all that in a short sample.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 21 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