From 769791716e992cfcc47b3a6ae31fda834364fa43 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 4 Oct 2012 11:34:51 +0000 Subject: [PATCH] --- PROMS/Volian.Print.Library/Pagination.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 362c1397..5ee3a43e 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -46,7 +46,6 @@ namespace Volian.Print.Library bool nearTheTop = (yWithinMargins < yPageSize) && (yWithinMargins > (yPageSize - 5 * SixLinesPerInch)); // if step is breaking over a number of pages, determine if the current step is the // location of a pagebreak. - if (MyItemInfo.ItemID == 23383 || MyItemInfo.ItemID == 23384) Console.WriteLine("here"); if (MyPageHelper.ParaBreaks.Count > 0) { if (this == MyPageHelper.ParaBreaks[0] || this.YTopMost > MyPageHelper.ParaBreaks[0].YTopMost) @@ -294,7 +293,9 @@ namespace Volian.Print.Library { vlnParagraph myPara = myList[stepLevel][yLocation]; // The top of this step will fit onto page (-yLocation < yWithinMargins) - if (-yLocation <= yUpperLimit) // Fix for OFN-RJ-23 + float wcnChkLstBorder = myPara.MyItemInfo.MyHLS.FormatStepData.UseSmartTemplate && + (myPara.MyItemInfo.MyHLS.FormatStepData.Suffix ?? "") != "" ? 2*SixLinesPerInch : 0; + if (wcnChkLstBorder -yLocation <= yUpperLimit) // Fix for OFN-RJ-23 //if (-yLocation < yUpperLimit) // Before //if (-yLocation < yWithinMargins && myList[stepLevel][yLocation].MyItemInfo.MyPrevious != null) { @@ -304,6 +305,7 @@ namespace Volian.Print.Library // The top of this step is more than 1/2 way down the page if ((-yLocation + yStart) >= yLowerLimit) return myPara; + // If this item will not fit on the current page, put a page break if (myPara.YBottom - myPara.YTop > (yUpperLimit - (-yLocation + yStart))) return myPara;