Don't paginate on an OR step if it's parent will fit on a page.
Only remove the Condition/Response header if the next Page Break is the first substep of the Condition/Response step.
This commit is contained in:
parent
293fcb2f1c
commit
de04f70185
@ -500,6 +500,18 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) // only do the following for Calvert Alarms
|
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) // only do the following for Calvert Alarms
|
||||||
{
|
{
|
||||||
|
// Or Step whose parent fits on a page should break at the parent step
|
||||||
|
//if (MyItemInfo.InList(40308)) Console.WriteLine("here");
|
||||||
|
//if (paraBreak.MyItemInfo.InList(40339))
|
||||||
|
float ySpaceOnNextPage = yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace;
|
||||||
|
if (paraBreak.MyItemInfo.IsOr && paraBreak.MyParent.YSize < ySpaceOnNextPage)
|
||||||
|
{
|
||||||
|
vlnParagraph paraBreakParent = paraBreak.MyParent;
|
||||||
|
while (paraBreakParent.MyParent.YSize < ySpaceOnNextPage)
|
||||||
|
paraBreakParent = paraBreakParent.MyParent;
|
||||||
|
//_MyLog.WarnFormat("Or Step PageBreak '{0}','{1}','{2}'",paraBreak.MyItemInfo.ShortPath ,paraBreak.MyItemInfo.MyProcedure.DisplayNumber, paraBreak.MyItemInfo.MyHLS.DisplayText);
|
||||||
|
paraBreak = paraBreakParent;
|
||||||
|
}
|
||||||
if (!paraBreak.ParentHasCalvertMacro)
|
if (!paraBreak.ParentHasCalvertMacro)
|
||||||
{
|
{
|
||||||
foreach (int lev in myList.Keys)
|
foreach (int lev in myList.Keys)
|
||||||
|
@ -376,6 +376,12 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
public float ParagraphToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
public float ParagraphToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||||
{
|
{
|
||||||
|
//if(PartsAbove.Count > 0 && PartsAbove[0] is vlnHeader)
|
||||||
|
// if (PartsLeft.Count > 0 && PartsLeft[0] is vlnTab)
|
||||||
|
// //if((PartsLeft[0] as vlnTab).Text[0] != '\u25CF')
|
||||||
|
// _MyLog.WarnFormat("NoteTab '{0}','{1}','{2}','{3}','{4}','{5}','{6}'", (PartsAbove[0] as vlnHeader).Text, (PartsLeft[0] as vlnTab).Text, MyItemInfo.MyProcedure.DisplayNumber, MyItemInfo.MyHLS.DisplayText,
|
||||||
|
// MyItemInfo.ShortPath, MyItemInfo.FormatStepData.TabData.IdentPrint, MyItemInfo.FormatStepData.TabData.IdentEdit);
|
||||||
|
//
|
||||||
if (MyItemInfo.PageNumber == 0) MyItemInfo.PageNumber = MyPageHelper.CurrentPageNumber;
|
if (MyItemInfo.PageNumber == 0) MyItemInfo.PageNumber = MyPageHelper.CurrentPageNumber;
|
||||||
else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != MyPageHelper.CurrentPageNumber)
|
else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != MyPageHelper.CurrentPageNumber)
|
||||||
{
|
{
|
||||||
@ -908,8 +914,14 @@ namespace Volian.Print.Library
|
|||||||
// remove the macro so that the header macro doesn't print on the page with the note (without this, an extraneous
|
// remove the macro so that the header macro doesn't print on the page with the note (without this, an extraneous
|
||||||
// header for the 'table'is printed.
|
// header for the 'table'is printed.
|
||||||
if (PartsLeft.Count != 0 && (PartsLeft[0] is vlnMacro) && MyPageHelper.ParaBreaks.Count != 0 && MyPageHelper.ParaBreaks[0].MyItemInfo.MyPrevious == null)
|
if (PartsLeft.Count != 0 && (PartsLeft[0] is vlnMacro) && MyPageHelper.ParaBreaks.Count != 0 && MyPageHelper.ParaBreaks[0].MyItemInfo.MyPrevious == null)
|
||||||
if (!MyPageHelper.ParaBreaks[0].MyItemInfo.IsNote && !MyPageHelper.ParaBreaks[0].MyItemInfo.IsCaution) PartsLeft.Clear();
|
if (!MyPageHelper.ParaBreaks[0].MyItemInfo.IsNote && !MyPageHelper.ParaBreaks[0].MyItemInfo.IsCaution)
|
||||||
|
{
|
||||||
|
// Only clear the header if it is the first child below
|
||||||
|
if (ChildrenBelow[0].MyItemInfo.ItemID == MyPageHelper.ParaBreaks[0].MyItemInfo.ItemID)
|
||||||
|
PartsLeft.Clear();
|
||||||
|
//else
|
||||||
|
// _MyLog.WarnFormat("Would Have Cleared PageHeader '{0}','{1}'", MyItemInfo.MyProcedure.DisplayNumber, MyItemInfo.MyHLS.DisplayText);
|
||||||
|
}
|
||||||
if (IsWordDocPara)
|
if (IsWordDocPara)
|
||||||
{
|
{
|
||||||
PdfReader tmp = null;
|
PdfReader tmp = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user