PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Header and Footer

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
Chezhian



Joined: 21 Apr 2009
Posts: 3

PostPosted: Tue Apr 21, 2009 2:42 pm    Post subject: Header and Footer Reply with quote

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
Back to top
View user's profile Send private message
Leo



Joined: 17 Apr 2009
Posts: 4

PostPosted: Fri Apr 24, 2009 9:46 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Chezhian



Joined: 21 Apr 2009
Posts: 3

PostPosted: Fri Apr 24, 2009 7:01 pm    Post subject: Reply with quote

Thanks Leo for answering my question.

Sorry it did not help me Sad 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.,
Back to top
View user's profile Send private message
Leo



Joined: 17 Apr 2009
Posts: 4

PostPosted: Sun Apr 26, 2009 11:45 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Chezhian



Joined: 21 Apr 2009
Posts: 3

PostPosted: Mon Apr 27, 2009 3:22 pm    Post subject: Reply with quote

Thank you very much Leo for your time.
It worked for me now Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com