Logic for putting a blank page in the PDF if the procedure prints duplex foldouts

This commit is contained in:
2013-08-29 13:16:59 +00:00
parent 2336a70679
commit 518e3182b2
3 changed files with 93 additions and 7 deletions

View File

@@ -92,9 +92,25 @@ namespace Volian.Print.Library
AddBookmarks(writer);
MyPageCounts.DrawTemplates();
}
private bool _OnBlankPage = false;
public bool OnBlankPage // used while inserting a blank page when printing a procedure with duplex foldouts
{
get { return _OnBlankPage; }
set { _OnBlankPage = value; }
}
private bool _AddBlankPagesForDuplexPrinting = false;
public bool AddBlankPagesForDuplexPrinting // Tells us if a the option to add a blank page is turn on (for procedures with duplex foldouts)
{
get { return _AddBlankPagesForDuplexPrinting; }
set { _AddBlankPagesForDuplexPrinting = value; }
}
public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document)
{
if (!OnFoldoutPage)
if (OnBlankPage)
{
OnBlankPage = false;
}
else if (!OnFoldoutPage)
{
if (DidFirstPageDocStyle) ResetDocStyleAndValues();
AddBookmarks(writer);