diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index ce6b5aef..ffc7eab9 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -385,6 +385,19 @@ namespace Volian.Print.Library } // Make sure that the FirstPiece (Caution Note HLS and First Substeps) fit float myFirstPieceSize = GetFirstPieceSize(); //Case 0 + // the following logic was added to fix Pagination for VCS BDMG1 Step 4 + if (ChildrenRight.Count > 0 && ChildrenRight[0].YOffset == YOffset) + { + float myFirstPieceRNOSize = 0; + myFirstPieceRNOSize = ChildrenRight[0].GetFirstPieceSize(); + if(myFirstPieceRNOSize < ySpaceOnCurPage) + if (ChildrenBelow.Count > 0) + { + float myFirstPieceAERSize = ChildrenBelow[0].GetFirstPieceSize() + ChildrenBelow[0].YOffset - YOffset; + if (myFirstPieceAERSize < myFirstPieceRNOSize) + myFirstPieceSize = myFirstPieceAERSize; + } + } if (myFirstPieceSize < ySpaceOnCurPage) yLowerLimit = Math.Max(myFirstPieceSize + yStart, yLowerLimit); //while ((YSize - yTop) >= ySpaceOnCurPage) // Pagination Fix Break1LineShort3b