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 

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
How to access each page in a multi page document.

 
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
NateDawg



Joined: 01 Apr 2008
Posts: 6

PostPosted: Tue Apr 01, 2008 5:06 am    Post subject: How to access each page in a multi page document. Reply with quote

I've searched the web and tried a few different things but so far no luck, so I figured I'd try posting here. I have a function that makes invoices with PDFsharp and I don't know how many pages they'll be until I start making them. When I get a particular number of line items I use

Page = document.AddPage
gfx= XGraphics.FromPdfPage(Page)

To make a new page and then I keep outputting from the database, until I fill another page then I do the same thing.

My question is, when I'm all done is there a way I can go back to each page so that I can add a "page # of #" to the top of each page? Seems like a simple thing to be able to access each page in a document. But for some reason I can't seem to figure it out. Any help or tips would be appreciated.

Thanks, Nathan Rover
Back to top
View user's profile Send private message
Emanuel



Joined: 21 Jul 2008
Posts: 4

PostPosted: Mon Jul 21, 2008 4:44 pm    Post subject: Reply with quote

for (int page = 0; page < document.PageCount; page++)
document.Pages[page].???

foreach(PdfPage page in document.Pages)
page.???
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Tue Jul 22, 2008 7:33 am    Post subject: Re: How to access each page in a multi page document. Reply with quote

NateDawg wrote:
My question is, when I'm all done is there a way I can go back to each page so that I can add a "page # of #" to the top of each page?

I can't answer that.
We use MigraDoc for anything that needs more than one page. MigraDoc has Headers and Footers that may include page numbers in the format you want.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
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