Consider whether an ‘End’ message is printed when determining page breaks
Added error log message ‘End Message LOW on page’, if the end message locates on the bottom line of page list box.
This commit is contained in:
parent
c79e514f3b
commit
eac2037172
@ -172,7 +172,7 @@ namespace Volian.Print.Library
|
||||
// Document style: DSS_PageBreakHLS breaks on hls.
|
||||
if (MyItemInfo.IsHigh && (MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageBreakHLS) == E_DocStructStyle.DSS_PageBreakHLS)
|
||||
{
|
||||
BuildPageBreakList(yPageSize, yPageSize, KeepStepsOnPage);
|
||||
BuildPageBreakList(yPageSize, yPageSize, KeepStepsOnPage, yEndMsg);
|
||||
ShowPageBreak(1, "Page Break on DSS_PageBreakHLS", "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak);
|
||||
return 1;
|
||||
}
|
||||
@ -181,7 +181,8 @@ namespace Volian.Print.Library
|
||||
{
|
||||
// if this step contains Cautions or Notes page breaks have to be added for those.
|
||||
if (TopMostChild != this) PageBreakOnStep = true;
|
||||
BuildPageBreakList(yPageSize, yPageSize, KeepStepsOnPage); // Case 1 :Works for ES05 Step 15 SubStep 7
|
||||
|
||||
BuildPageBreakList(yPageSize, yPageSize, KeepStepsOnPage, yEndMsg); // Case 1 :Works for ES05 Step 15 SubStep 7
|
||||
ShowPageBreak(1, "Page Break on Steps, Cautions or Notes", "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak);
|
||||
return 1;
|
||||
}
|
||||
@ -302,7 +303,7 @@ namespace Volian.Print.Library
|
||||
else
|
||||
ShowPageBreak(6, "HLS will have to split on current page", "Special", YSize, yPageSizeNextPage, yWithinMargins, ManualPageBreak);
|
||||
//BuildPageBreakList(yWithinMargins + SixLinesPerInch, yPageSizeNextPage + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
|
||||
BuildPageBreakList(ySpaceOnFirstPage, yPageSize + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
|
||||
BuildPageBreakList(ySpaceOnFirstPage, yPageSize + yExtra2, KeepStepsOnPage, yEndMsg); // Case 5 - Determine items where page break(s) occur
|
||||
return 0; // Stay on this page
|
||||
}
|
||||
|
||||
@ -318,7 +319,7 @@ namespace Volian.Print.Library
|
||||
// Pagination Fix Break1LineShort2
|
||||
//BuildPageBreakList(yPageSize + yExtra, yPageSize); // Case 1 :Works for ES05 Step 15 SubStep 7
|
||||
// Pagination Fix Break1LineShort4
|
||||
BuildPageBreakList(yPageSize + yExtra, yPageSizeNextPage + yExtra2, KeepStepsOnPage); // Case 1 :Works for ES05 Step 15 SubStep 7
|
||||
BuildPageBreakList(yPageSize + yExtra, yPageSizeNextPage + yExtra2, KeepStepsOnPage, yEndMsg); // Case 1 :Works for ES05 Step 15 SubStep 7
|
||||
return 1; // Paginate on High Level Steps
|
||||
}
|
||||
//if (yWithinMargins > yPageSize / 2)
|
||||
@ -417,7 +418,7 @@ namespace Volian.Print.Library
|
||||
return pg;
|
||||
return pg.MyParent.ChildrenBelow[0];
|
||||
}
|
||||
private void BuildPageBreakList(float ySpaceOnCurPage, float yPageSize, bool KeepStepsOnPage)
|
||||
private void BuildPageBreakList(float ySpaceOnCurPage, float yPageSize, bool KeepStepsOnPage, float yEndMsg)
|
||||
{
|
||||
// if this paragraph is flagged to pagebreakonstep (i.e. these are used by background documents
|
||||
// to get each hls/caution/note to be on its own page), then any of the children above should
|
||||
@ -503,10 +504,11 @@ namespace Volian.Print.Library
|
||||
ySpaceOnCurPage += SixLinesPerInch;
|
||||
accountForSmartTemplateHeader = Height - (2 * SixLinesPerInch);
|
||||
}
|
||||
|
||||
while (((YSize - yTop) > (ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter)) || PageBreakOnStepList.Count > 0)
|
||||
while (((YSize - yTop) > (ySpaceOnCurPage - (accountForCalvertAlarmConditionResponseFooter+yEndMsg))) || PageBreakOnStepList.Count > 0)
|
||||
{
|
||||
float ySpaceOnCurPageSave = ySpaceOnCurPage;
|
||||
if (((YSize - yTop) <= (ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter)) || PageBreakOnStepList.Count > 0)
|
||||
ySpaceOnCurPage -= yEndMsg;
|
||||
ySpaceOnCurPage -= myBottomMsgSpace;
|
||||
vlnParagraph lastBreak = paraBreak;
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage-accountForCalvertAlarmConditionResponseFooter, yLowerLimit,
|
||||
@ -680,7 +682,7 @@ namespace Volian.Print.Library
|
||||
MyPageHelper.ParaBreaks.Add(paraBreak);
|
||||
ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||
ySpaceOnCurPage -= accountForSmartTemplateHeader;
|
||||
|
||||
|
||||
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||
//if (paraBreak.YTopMost != paraBreak.YVeryTop && MyPageHelper.TopMessage == null && MyPageHelper.BottomMessage == null)
|
||||
// ySpaceOnCurPage = yPageSize;
|
||||
|
@ -1286,6 +1286,7 @@ namespace Volian.Print.Library
|
||||
if (myMsg.Contains("%-12s"))
|
||||
myMsg = myMsg.Replace("%-12s", MyItemInfo.MyProcedure.DisplayNumber.PadRight(12));
|
||||
float xpos = 0;
|
||||
if (yTopMargin-docstyle.Layout.PageLength>=msg_yLocation) _MyLog.WarnFormat("End Message LOW on page: {0}, {1}, {2}, Page {3}",msg_yLocation, MyItemInfo.ItemID, MyItemInfo.ShortPath, MyPageHelper.CurrentPageNumber+1);
|
||||
if ((docstyle.End.Margin ?? 0) != 0)
|
||||
{
|
||||
xpos = (float)docstyle.Layout.LeftMargin + (float)docstyle.End.Margin;
|
||||
|
Loading…
x
Reference in New Issue
Block a user