PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 3:38 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Apr 01, 2008 5:06 am 
Offline

Joined: Tue Apr 01, 2008 4:41 am
Posts: 6
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


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

Joined: Mon Jul 21, 2008 4:20 pm
Posts: 4
for (int page = 0; page < document.PageCount; page++)
document.Pages[page].???

foreach(PdfPage page in document.Pages)
page.???


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 22, 2008 7:33 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 306 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