View previous topic :: View next topic |
Author |
Message |
choreson
Joined: 17 Jul 2007 Posts: 12
|
Posted: Mon Jul 23, 2007 8:11 pm Post subject: How do we add page number to the document? |
|
|
I haven't figured out how to do this. Does the document have a ShowPageNumber property, such that we can say:
document.ShowPageNumber = true
? |
|
Back to top |
|
 |
choreson
Joined: 17 Jul 2007 Posts: 12
|
Posted: Tue Jul 24, 2007 3:16 am Post subject: Re: How do we add page number to the document? |
|
|
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. |
|
Back to top |
|
 |
Thomas Hoevel

Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Tue Jul 24, 2007 12:44 pm Post subject: |
|
|
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 |
|
Back to top |
|
 |
choreson
Joined: 17 Jul 2007 Posts: 12
|
Posted: Tue Jul 24, 2007 1:28 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
|