Search code examples
c#migradoc

MigraDoc: How to add a blank page after a section on odd pages?


I want to create a PDF document for double-sided printing to save paper on an report.

On odd pages after the end of an section, there should be a blank page reading "This page is intentionally left blank.", such that the report can be split by chapters as needed.

Any hints how to do this?


Solution

  • MigraDoc creates blank pages as needed. Just indicate in the PageSetup that you are creating a double-sided layout.

    The tricky part is adding the text "This page is intentionally left blank". I think I'd add that text with PDFsharp after rendering the page with MigraDoc. But I'd rather leave the page blank, assuming the reader is smart enough to realize it was left blank to get a double-sided layout.