|
|
|
@@ -465,6 +465,9 @@ namespace Volian.Print.Library
|
|
|
|
|
|
|
|
|
|
public float ParagraphToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
|
|
|
|
{
|
|
|
|
|
// Don't print section titles for supplemental information because the title is 'Supplemental Information':
|
|
|
|
|
if (MyItemInfo.IsSection && MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.SupInfoPdfPrint) return yPageStart;
|
|
|
|
|
|
|
|
|
|
//if(PartsAbove.Count > 0 && PartsAbove[0] is vlnHeader)
|
|
|
|
|
// if (PartsLeft.Count > 0 && PartsLeft[0] is vlnTab)
|
|
|
|
|
// //if((PartsLeft[0] as vlnTab).Text[0] != '\u25CF')
|
|
|
|
@@ -1604,27 +1607,30 @@ namespace Volian.Print.Library
|
|
|
|
|
// 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 (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && !MyItemInfo.IsSection && MyItemInfo.IsHigh && MyItemInfo.MyPrevious == null && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
|
|
|
|
// 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))
|
|
|
|
|
{
|
|
|
|
|
// check if the item is printed, a step is always printed but a section title may or may not based on format flags. if it is not
|
|
|
|
|
// printed, don't put out facing page because it will be put out when there is printable text.
|
|
|
|
|
itemIsPrinted = IsPrintedStepItemForSupInfo();
|
|
|
|
|
if (itemIsPrinted)
|
|
|
|
|
// 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)
|
|
|
|
|
{
|
|
|
|
|
// 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();
|
|
|
|
|
}
|
|
|
|
|
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))
|
|
|
|
@@ -1699,7 +1705,7 @@ namespace Volian.Print.Library
|
|
|
|
|
}
|
|
|
|
|
// See comments under case 0 explaining supinfo/facing page processing.
|
|
|
|
|
itemIsPrinted = IsPrintedStepItemForSupInfo();
|
|
|
|
|
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && itemIsPrinted && !MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
|
|
|
|
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && !MyPageHelper.CreatingSupInfoPage && itemIsPrinted /*&& !MyItemInfo.IsSection*/ && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
|
|
|
|
{
|
|
|
|
|
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
|
|
|
|
|
if (sid != -1)
|
|
|
|
@@ -1809,7 +1815,7 @@ namespace Volian.Print.Library
|
|
|
|
|
MyPromsPrinter.NewPage();
|
|
|
|
|
_MyLog.InfoFormat("NewPage Break within step blank {0}", cb.PdfWriter.CurrentPageNumber);
|
|
|
|
|
}
|
|
|
|
|
if (!MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
|
|
|
|
if (!MyPageHelper.CreatingSupInfoPage && !MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
|
|
|
|
{
|
|
|
|
|
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
|
|
|
|
|
if (sid != -1)
|
|
|
|
@@ -1968,7 +1974,7 @@ namespace Volian.Print.Library
|
|
|
|
|
}
|
|
|
|
|
// See comments under case 0 explaining supinfo/facing page processing.
|
|
|
|
|
itemIsPrinted = IsPrintedStepItemForSupInfo();
|
|
|
|
|
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && itemIsPrinted && !MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
|
|
|
|
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && !MyPageHelper.CreatingSupInfoPage && itemIsPrinted /*&& !MyItemInfo.IsSection */ && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
|
|
|
|
{
|
|
|
|
|
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
|
|
|
|
|
if (sid != -1)
|
|
|
|
@@ -3510,6 +3516,8 @@ namespace Volian.Print.Library
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (itemInfo is StepInfo && ((itemInfo as StepInfo).MyConfig as StepConfig).Step_PreferredPagebreak) HasPrefPageBreak = true;
|
|
|
|
|
// The following adds supplemental information items to the SupInfoSection list off of the section level paragraph for printing
|
|
|
|
|
// of the sup info pdf. The SupInfoSection list is just a flat list of all supplemental information within the section.
|
|
|
|
|
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && loadChildren && itemInfo.SupInfos != null)
|
|
|
|
|
{
|
|
|
|
|
SupInfoSection.ChildrenBelow.Add(cb, itemInfo.SupInfos, XOffset, 0, 0, rnoLevel, maxRNO, formatInfo);
|
|
|
|
|