0

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?

Lagoda Denis
  • 235
  • 5
  • 13

1 Answers1

1

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

Community
  • 1
  • 1