Logic for putting a blank page in the PDF if the procedure prints duplex foldouts
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user