PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

page count and insert page before rendering document
https://forum.pdfsharp.net/viewtopic.php?f=2&t=823
Page 1 of 1

Author:  erik_buchanan@yahoo.com [ Thu Aug 06, 2009 4:44 pm ]
Post subject:  page count and insert page before rendering document

Hopefully somebody can help with this.

I am generating a large pdf by cycling through a dataset and then rendering the document at the end.

My problem is that if the section of the document from one of the records ends on an odd page i need to insert a spacer page so i can offset the duplex printing.

Author:  Thomas Hoevel [ Mon Aug 10, 2009 8:10 am ]
Post subject:  Re: page count and insert page before rendering document

I presume you are using MigraDoc.

For Duplex printing, just set PageSetup.MirrorMargins to true (typically you change the PageSetup for the first section you create - further sections inherit the PageSetup of the first section if you don't set a PageSetup.

Also set either
Code:
PageSetup.SectionStart = BreakType.BreakOddPage;

or
Code:
PageSetup.SectionStart = BreakType.BreakEvenPage;

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/