henrylar wrote:
is there an example of this anywhere that you can think of?
I'm not sure what you're looking for.
If you want to add page numbers using MigraDoc, do it like this:
Code:
// Create footer
Paragraph paragraphOne = section.Footers.Primary.AddParagraph();
paragraphOne.AddText("Seite ");
paragraphOne.AddPageField();
paragraphOne.AddText("/");
paragraphOne.AddNumPagesField();
paragraph.Style = "Style1";
Page count must not start at 1:
Code:
section.PageSetup.StartingNumber = 1;
So page numbering in the first document can start at 2 (reserving 1 for the cover page).
If the first document has 8 pages, second document can start at page 9.
Here is a snippet that calls RenderPage to create the PDF file page by page:
viewtopic.php?p=1735#p1735This way you get your fingers on the PdfPage objects; thus you can modify the pages right when they are created; you can even store the pages in a list and when the document is done, you can still modify the pages (to add pages numbers and or total page count).
It should work to begin with an empty cover page, then create the other documents and finally create the cover page with the total page number and references to the following documents at pages 2 and 9 respectively.