diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index f9c777f3..fa1d6de6 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -474,7 +474,8 @@ namespace Volian.Print.Library float wcnChkLstBorder = myPara.MyItemInfo.MyHLS != null && myPara.MyItemInfo.MyHLS.FormatStepData.UseSmartTemplate && (myPara.MyItemInfo.MyHLS.FormatStepData.Suffix ?? "") != "" ? 2*SixLinesPerInch : 0; if (myPara != lastBreak && (minPara == null || minPara.YTop > myPara.YTop)) - minPara = myPara; + if ((-yLocation + yStart) >= yLowerLimit) // Only if it is more than the lower limit + minPara = myPara; if (myPara.MyParent.YTop == myPara.YTop) myPara = myPara.MyParent; if (wcnChkLstBorder -yLocation <= yUpperLimit) // Fix for OFN-RJ-23 //if (-yLocation < yUpperLimit) // Before @@ -486,12 +487,14 @@ namespace Volian.Print.Library // The top of this step is more than 1/2 way down the page if ((-yLocation + yStart) >= yLowerLimit) if (myPara != lastBreak) - return myPara; + if ((-yLocation + yStart) >= yLowerLimit) // Only if it is more than the lower limit + return myPara; // If this item will not fit on the current page, put a page break if (myPara.YBottom - myPara.YTop > (yUpperLimit - (-yLocation + yStart))) if (myPara != lastBreak) - return myPara; + if ((-yLocation + yStart) >= yLowerLimit) // Only if it is more than the lower limit + return myPara; // if is a caution or note & parent is a substep and entire substep doesn't fit, break. if ((myPara.MyItemInfo.IsNote || myPara.MyItemInfo.IsCaution) && !myPara.MyParent.MyItemInfo.IsHigh && diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index e77f567f..4a5cc455 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1909,8 +1909,14 @@ namespace Volian.Print.Library float yOffRight = yoff; float RnoOffset = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO); if (rnoLevel < maxRNO && itemInfo.RNOs != null) + { yOffRight = ChildrenRight.Add(cb, itemInfo.RNOs, XOffset + RnoOffset, YTop, YTop, rnoLevel + 1, maxRNO, formatInfo); - + if (ChildrenRight[0].ChildrenAbove.Count > 0) + { + YOffset = ChildrenRight[0].YOffset; + if (MyTab != null) MyTab.YOffset = ChildrenRight[0].YOffset; + } + } // Need code to determine if the table will overlap the Right Column if it does then // use YOffRight rather than yoff if (itemInfo.Tables != null)