|
PDFsharp - moved to http://forum.pdfsharp.net/ Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
|
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.
View previous topic :: View next topic |
Author |
Message |
NateDawg
Joined: 01 Apr 2008 Posts: 6
|
Posted: Tue Apr 01, 2008 5:06 am Post subject: How to access each page in a multi page document. |
|
|
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 |
|
|
Emanuel
Joined: 21 Jul 2008 Posts: 4
|
Posted: Mon Jul 21, 2008 4:44 pm Post subject: |
|
|
for (int page = 0; page < document.PageCount; page++)
document.Pages[page].???
foreach(PdfPage page in document.Pages)
page.??? |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Tue Jul 22, 2008 7:33 am Post subject: Re: How to access each page in a multi page document. |
|
|
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 |
|
|
|
|
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
|
|