PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 7:54 am

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: Mon Jul 23, 2007 8:11 pm 
Offline

Joined: Tue Jul 17, 2007 7:12 pm
Posts: 12
I haven't figured out how to do this. Does the document have a ShowPageNumber property, such that we can say:

document.ShowPageNumber = true

?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 24, 2007 3:16 am 
Offline

Joined: Tue Jul 17, 2007 7:12 pm
Posts: 12
choreson wrote:
I haven't figured out how to do this. Does the document have a ShowPageNumber property, such that we can say:

document.ShowPageNumber = true

?


Is Thomas around? Could you please give us a hint? Thanks.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 24, 2007 12:44 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Using MigraDoc this is quite simple: your document has Headers and Footers. Add a Paragraph to the appropriate header or footer and call
Code:
par.AddPageField();

to add the current page number or call
Code:
par.AddNumPagesField();

to add the total page number.
You can even have different headers and footers for first page, even pages, and odd pages. Set the Primary header/footer to have one for all.
Headers and Footers belong to the section. Start a new section to change Headers and Footers within a document.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 24, 2007 1:28 pm 
Offline

Joined: Tue Jul 17, 2007 7:12 pm
Posts: 12
Thomas Hövel wrote:
Using MigraDoc this is quite simple: your document has Headers and Footers. Add a Paragraph to the appropriate header or footer and call
Code:
par.AddPageField();

to add the current page number or call
Code:
par.AddNumPagesField();

to add the total page number.
You can even have different headers and footers for first page, even pages, and odd pages. Set the Primary header/footer to have one for all.
Headers and Footers belong to the section. Start a new section to change Headers and Footers within a document.


Wonderful! Thank you so much. Let me give it a try.


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: No registered users and 42 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