B2018-092 - Determine if a table is too big based on the current line-spacing (6 or 7 LPI) & Determine the location of the bottom continue message based on the current line-spacing (6 or 7 LPI)

This commit is contained in:
Rich 2018-06-11 16:02:50 +00:00
parent 4d20d8219b
commit 97e431950c

View File

@ -905,7 +905,8 @@ namespace Volian.Print.Library
MyGrid.TooBig = SixLinesPerInch + MyGrid.Height * MyPageHelper.YMultiplier - (yLocation - yBottomMargin - ySizeBtmCtnMess); MyGrid.TooBig = SixLinesPerInch + MyGrid.Height * MyPageHelper.YMultiplier - (yLocation - yBottomMargin - ySizeBtmCtnMess);
float heightAfter = MyGrid.Height + 4 * MyPageHelper.YMultiplier; float heightAfter = MyGrid.Height + 4 * MyPageHelper.YMultiplier;
MyPageHelper.TableAdjustment += (heightBefore - heightAfter); MyPageHelper.TableAdjustment += (heightBefore - heightAfter);
if (heightAfter < (yLocation - yBottomMargin - ySizeBtmCtnMess)) //B2018-092 Determine if the Table is too big by checking it including either 6 LPI or 7 LPI as appropriate
if (heightAfter * MyPageHelper.YMultiplier < (yLocation - yBottomMargin - ySizeBtmCtnMess))
{ {
// B2018-081 - Removed error log message if the code was able to properly adjust the table // B2018-081 - Removed error log message if the code was able to properly adjust the table
//_MyLog.WarnFormat("\r\n==> Table is too big to fit on page, Vertical Padding adjusted to fit in\r\n" + //_MyLog.WarnFormat("\r\n==> Table is too big to fit on page, Vertical Padding adjusted to fit in\r\n" +
@ -934,9 +935,11 @@ namespace Volian.Print.Library
} }
} }
} }
MyPageHelper.BottomContent = yLocation - (MyGrid.Height + 4 * MyPageHelper.YMultiplier); //B2018-092 Correct the location of the bottom continue message including either 6 LPI or 7 LPI as appropriate
MyPageHelper.BottomContent = yLocation - (MyGrid.Height + 4) * MyPageHelper.YMultiplier;
float retval = Rtf2Pdf.GridAt(cb, MyGrid, XOffset, yLocation, Width, 100, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless")); float retval = Rtf2Pdf.GridAt(cb, MyGrid, XOffset, yLocation, Width, 100, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"));
if (MyGrid.Height > (yTopMargin - yBottomMargin)) //B2018-092 Determine if the Table is too big by checking it including either 6 LPI or 7 LPI as appropriate
if ((MyGrid.Height + 4)* MyPageHelper.YMultiplier > (yLocation - yBottomMargin - ySizeBtmCtnMess))
{ {
// B2018-081 Changed the Error Log Message to be more useful when a table is too big. // B2018-081 Changed the Error Log Message to be more useful when a table is too big.
_MyLog.ErrorFormat("\r\n==> Table is too big to fit on page, expect pagination problems in\r\n" + _MyLog.ErrorFormat("\r\n==> Table is too big to fit on page, expect pagination problems in\r\n" +