B2017-139: SAMG Facing page print has missing blank pages
This commit is contained in:
parent
24d6cf60ab
commit
61af3b60cc
@ -891,10 +891,10 @@ namespace Volian.Print.Library
|
||||
_MyHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
NewPage();
|
||||
firstStepSec = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
firstStepSec = false;
|
||||
CreateStepPdf(mySection, cb);
|
||||
}
|
||||
else
|
||||
|
@ -1604,33 +1604,51 @@ namespace Volian.Print.Library
|
||||
yPageStart = _yPageStartForSupInfo - SixLinesPerInch;
|
||||
yLocation = yPageStart - YTopMost;
|
||||
}
|
||||
// printing a procedure with section(s) that have supplemental information - determine facing page needed to be merged in. For
|
||||
// case 0, it is typically at the beginning of the section since the page break occurred in the code that calls this.
|
||||
// Note that if the procedure has any sections with supinfo, then the entire procedure will need facing pages, either blank page
|
||||
// or supinfo steps. Also, if the section title is printed, then need to get the facing page before the section title is printed and if
|
||||
// this is the hls where the section title was printed, don't do the facing page.
|
||||
bool titlePrinted = false;
|
||||
if (MyItemInfo.IsSection || (MyItemInfo.IsHigh && MyItemInfo.MyPrevious == null))
|
||||
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge)
|
||||
{
|
||||
// see if the section title is printed.
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
titlePrinted = (sch == null || sch.Section_PrintHdr == "Y") || !(MyItemInfo.MyActiveSection as SectionInfo).HasSupInfoSteps;
|
||||
titlePrinted &= (ShowSectionTitles && !MyItemInfo.MyDocStyle.CancelSectTitle);
|
||||
}
|
||||
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && (MyItemInfo.ActiveSection as SectionInfo).HasSupInfoSteps && ((MyItemInfo.IsHigh && MyItemInfo.MyPrevious == null && !titlePrinted) || (MyItemInfo.IsStepSection && titlePrinted)) && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
||||
{
|
||||
// If there is supplemental information to be printed on the facing page, then get the id that has supinfo
|
||||
// so that it can be retrieved from the pdf for the supinfos for this section.
|
||||
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
|
||||
if (sid != -1)
|
||||
// printing a procedure with section(s) that have supplemental information - determine facing page needed to be merged in. For
|
||||
// case 0, it is typically at the beginning of the section since the page break occurred in the code that calls this.
|
||||
// Note that if the procedure has any sections with supinfo, then the entire procedure will need facing pages, either blank page
|
||||
// or supinfo steps.
|
||||
// If the section title is printed, then need to get the facing page before the section title is printed and if
|
||||
// this is the hls where the section title was printed, don't do the facing page.
|
||||
bool titlePrinted = false;
|
||||
if (MyItemInfo.IsSection || (MyItemInfo.IsHigh && MyItemInfo.MyPrevious == null))
|
||||
{
|
||||
MyPromsPrinter.DoSupInfoPage(cb, "TEMP", MyPageHelper.TextLayer, MyPageHelper, sid, true);
|
||||
// see if the section title is printed.
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
titlePrinted = (sch == null || sch.Section_PrintHdr == "Y") || !(MyItemInfo.MyActiveSection as SectionInfo).HasSupInfoSteps;
|
||||
titlePrinted &= (ShowSectionTitles && !MyItemInfo.MyDocStyle.CancelSectTitle);
|
||||
}
|
||||
else
|
||||
// If this is first step section and there is no supinfo, the blank page was done in proms printer.
|
||||
// If this is first step section and there is supinfo, it needs to be put out
|
||||
bool notFirstOrFirstHasSupInfo = false;
|
||||
bool firstSec = true;
|
||||
foreach (SectionInfo sec in MyItemInfo.MyProcedure.Sections)
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
if (sec.IsStepSection)
|
||||
{
|
||||
if (sec.ItemID == MyItemInfo.MyActiveSection.ItemID) break;
|
||||
firstSec = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
notFirstOrFirstHasSupInfo = !firstSec || (MyItemInfo.ActiveSection as SectionInfo).HasSupInfoSteps;
|
||||
if (notFirstOrFirstHasSupInfo && ((MyItemInfo.IsHigh && MyItemInfo.MyPrevious == null && !titlePrinted) || (MyItemInfo.IsStepSection && titlePrinted)) && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
||||
{
|
||||
// If there is supplemental information to be printed on the facing page, then get the id that has supinfo
|
||||
// so that it can be retrieved from the pdf for the supinfos for this section.
|
||||
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
|
||||
if (sid != -1)
|
||||
{
|
||||
MyPromsPrinter.DoSupInfoPage(cb, "TEMP", MyPageHelper.TextLayer, MyPageHelper, sid, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (MyItemInfo.IsHigh && MyItemInfo.MyPrevious != null && ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS))
|
||||
@ -1815,7 +1833,7 @@ namespace Volian.Print.Library
|
||||
MyPromsPrinter.NewPage();
|
||||
_MyLog.InfoFormat("NewPage Break within step blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
}
|
||||
if (!MyPageHelper.CreatingSupInfoPage && !MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
||||
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && !MyPageHelper.CreatingSupInfoPage && !MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
||||
{
|
||||
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
|
||||
if (sid != -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user