PDFsharp & MigraDoc Foundation http://forum.pdfsharp.com/ |
|
Header and Footer http://forum.pdfsharp.com/viewtopic.php?f=2&t=710 |
Page 1 of 1 |
Author: | Chezhian [ Tue Apr 21, 2009 2:42 pm ] |
Post subject: | Header and Footer |
I am using the migradoc and would like to set the footer with page numbers like Page 1 of 10 and so on.. Appreciate your help on how to do this. Thanks |
Author: | Leo [ Fri Apr 24, 2009 9:46 am ] |
Post subject: | |
Hello Chezhian, this is what I do ta add on footer the page number: Code: p = New Paragraph()
p.AddText("Pag.") p.AddPageField() p.AddText(" di ") p.AddNumPagesField() p.Format.Alignment = ParagraphAlignment.Right section.Footers.Primary.Add(p) I hope could be usefull for you. |
Author: | Chezhian [ Fri Apr 24, 2009 7:01 pm ] |
Post subject: | |
Thanks Leo for answering my question. Sorry it did not help me I have mulitple pages for example (10 pages) then on each page I need to have the footer like Page 1 of 10.. Page 2 of 10 etc., |
Author: | Leo [ Sun Apr 26, 2009 11:45 am ] |
Post subject: | |
I paste my entire code to generate my pdf document. The footer with page number indication works in each page for me: Code: Dim style As Style pdfDocument = New Document() [.......] Dim section As Section Dim r As Row Dim c As Column section = pdfDocument.AddSection() [...........] 'Aggiungo il numero di pagina in basso a destra p = New Paragraph() p.AddText("Pag. ") p.AddPageField() p.AddText(" di ") p.AddNumPagesField() p.Format.Alignment = ParagraphAlignment.Right section.Footers.Primary.Add(p) I removed the code I think aren't usefull for your needs... |
Author: | Chezhian [ Mon Apr 27, 2009 3:22 pm ] |
Post subject: | |
Thank you very much Leo for your time. It worked for me now |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |