B2017-161: Improvements to background pagination
This commit is contained in:
parent
c4b443a7aa
commit
7eef093c90
@ -887,7 +887,11 @@ namespace Volian.Print.Library
|
|||||||
ySpaceOnCurPage -= yEndMsg;
|
ySpaceOnCurPage -= yEndMsg;
|
||||||
ySpaceOnCurPage -= myBottomMsgSpace;
|
ySpaceOnCurPage -= myBottomMsgSpace;
|
||||||
vlnParagraph lastBreak = paraBreak;
|
vlnParagraph lastBreak = paraBreak;
|
||||||
if (PageBreakOnStepList.Count > 0 && (PageBreakOnStepList[0].YTop - (lastBreak == null ? 0 : lastBreak.YTop) <= ySpaceOnCurPage))
|
// PageBreakOnStepList contains steps where a page break needs to occur based on format, for example backgrounds require cautions/notes/HLS
|
||||||
|
// to have page breaks. As each of these are processed (after this code) the topmost item in PageBreakOnStepList is removed.
|
||||||
|
// The following checks if the entire step will fit for these types of steps and if so return the next break, i.e. [0], from the PageBreakOnStepList.
|
||||||
|
// The if was changed to fix B2017-161.
|
||||||
|
if (PageBreakOnStepList.Count > 0 && (PageBreakOnStepList[0].YTop - (lastBreak == null ? ((TopMostChild != null) ? TopMostChild.YTop : 0) : lastBreak.YTop) <= ySpaceOnCurPage))
|
||||||
paraBreak = PageBreakOnStepList[0];
|
paraBreak = PageBreakOnStepList[0];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1146,7 +1150,9 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
onNewPage = true;
|
onNewPage = true;
|
||||||
float yTopNew = Math.Min(paraBreak.YTopMost, paraBreak.YVeryTop) - YTopMost;
|
float yTopNew = Math.Min(paraBreak.YTopMost, paraBreak.YVeryTop) - YTopMost;
|
||||||
|
// B2017-161: unnecessary PageBreak for background documents: use the 'usedPageBreakOnStepList' flag when using the PageBreakOnStepList, don't adjust space on page to account
|
||||||
|
// for continue message, if there is not one.
|
||||||
|
bool usedPageBreakOnStepList = false;
|
||||||
// This is for formats that break on all HLS, Cautions & Notes (often backgrounds):
|
// This is for formats that break on all HLS, Cautions & Notes (often backgrounds):
|
||||||
if (PageBreakOnStepList.Count > 0)
|
if (PageBreakOnStepList.Count > 0)
|
||||||
{
|
{
|
||||||
@ -1158,6 +1164,7 @@ namespace Volian.Print.Library
|
|||||||
paraBreak = PageBreakOnStepList[0];
|
paraBreak = PageBreakOnStepList[0];
|
||||||
PageBreakOnStepList.RemoveAt(0);
|
PageBreakOnStepList.RemoveAt(0);
|
||||||
yTopNew = paraBreak.YTop - YTopMost;
|
yTopNew = paraBreak.YTop - YTopMost;
|
||||||
|
usedPageBreakOnStepList = true;
|
||||||
}
|
}
|
||||||
// The following code caused forced pagination for Catawba EOP BG - EP/1/A/5000/FR-C.1.SC..S16..N2..S4..S1.
|
// The following code caused forced pagination for Catawba EOP BG - EP/1/A/5000/FR-C.1.SC..S16..N2..S4..S1.
|
||||||
//else if(PageBreakOnStepList[0].YSize - yTop <= ySpaceOnCurPage)
|
//else if(PageBreakOnStepList[0].YSize - yTop <= ySpaceOnCurPage)
|
||||||
@ -1182,7 +1189,7 @@ namespace Volian.Print.Library
|
|||||||
doSectionTitleContinued1 = false;
|
doSectionTitleContinued1 = false;
|
||||||
}
|
}
|
||||||
if (doSectionTitleContinued1) ySpaceOnNextPage1 -= 2 * SixLinesPerInch; // B2016-195: Account for Section Continue Message
|
if (doSectionTitleContinued1) ySpaceOnNextPage1 -= 2 * SixLinesPerInch; // B2016-195: Account for Section Continue Message
|
||||||
ySpaceOnCurPage = ySpaceOnNextPage1;
|
if (!usedPageBreakOnStepList) ySpaceOnCurPage = ySpaceOnNextPage1;
|
||||||
|
|
||||||
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||||
//if (paraBreak.YTopMost != paraBreak.YVeryTop && MyPageHelper.TopMessage == null && MyPageHelper.BottomMessage == null)
|
//if (paraBreak.YTopMost != paraBreak.YVeryTop && MyPageHelper.TopMessage == null && MyPageHelper.BottomMessage == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user