Reputation: 235
Searching examples could not find a way to add page numbering using MigraDoc to existing PDFs.
So I have:
PdfDocument outPdf = new PdfDocument()
var pdfFile = PdfReader.Open(new MemoryStream(pdfData), PdfDocumentOpenMode.Import))
CopyPages(pdfFile, outPdf)
How to add here a Section, Paragraph, Footer/Header?
Upvotes: 0
Views: 2379
Reputation: 21689
The code you are showing uses PDFsharp, not MigraDoc.
MigraDoc cannot alter PDF documents. It can create PDF documents - with headers, footers, page numbers.
PDFsharp can alter PDF pages.
See this answer for a code sample:
https://stackoverflow.com/a/34998271/1015447
Upvotes: 1