B2020-013 Added check for second RNO that will fit on the page
Corrected Debug message for Leading so 7lpi is factored in B2020-014 Corrected 7lpi print of tables so that they shrink properly
This commit is contained in:
@@ -602,6 +602,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.DrawText");
|
||||
IsCompressed = (MyPageHelper.YMultiplier != 1 && MyItemInfo != null && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Font.Size >= 12 && (MyItemInfo.FormatStepData.Font.Style & E_Style.Underline) != 0);
|
||||
|
||||
retval = DrawText(cb, ref yPageStart, yTopMargin, yBottomMargin, ref yLocation);
|
||||
// _yPageStartForSupInfo is used to move steps down the page for the supinfo pdf. Each supinfo step may not be related to previous in structure, so need this to set y location.
|
||||
if (MyItemInfo.IsInSupInfo) _yPageStartForSupInfo = retval;
|
||||
@@ -909,7 +910,7 @@ namespace Volian.Print.Library
|
||||
if (DebugText.IsOpen) DebugText.WriteLine("{0},'{1}','{2}','<<END>>',{3}", MyItemInfo.ItemID, MyItemInfo.ShortPath, MyItemInfo.MyContent.Text, XOffset);
|
||||
//if (MyItemInfo.InList(11019,11024,111026)) // RHM20150507 Table Scrunch
|
||||
// Console.WriteLine("here");
|
||||
float heightBefore = MyGrid.Height + 4 * MyPageHelper.YMultiplier;
|
||||
float heightBefore = (MyGrid.Height + 4) * MyPageHelper.YMultiplier; // B2020-014 added parenthesis was calculating wrong for 7lpi Callaway FSG-7 Attachment 7
|
||||
// B2018-033 Account for bottom continue message when seeing if a scrunched table will fit
|
||||
float ySizeBtmCtnMess = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
|
||||
// B2018-085 Ignore the bottom continue message if the Table is the last part of the step.
|
||||
@@ -918,7 +919,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
//MyGrid.TooBig = (MyItemInfo.MyDocStyle.Layout.FooterLength ?? 0) + SixLinesPerInch + MyGrid.Height - (yLocation - yBottomMargin);
|
||||
MyGrid.TooBig = SixLinesPerInch + MyGrid.Height * MyPageHelper.YMultiplier - (yLocation - yBottomMargin - ySizeBtmCtnMess);
|
||||
float heightAfter = MyGrid.Height + 4 * MyPageHelper.YMultiplier;
|
||||
float heightAfter = (MyGrid.Height + 4) * MyPageHelper.YMultiplier; // B2020-014 added parenthesis was calculating wrong for 7lpi Callaway FSG-7 Attachment 7
|
||||
MyPageHelper.TableAdjustment += (heightBefore - heightAfter);
|
||||
//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))
|
||||
@@ -1380,6 +1381,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private void ResetDocStyleAndValues(ref float yTopMargin, ref float yBottomMargin)
|
||||
{
|
||||
//float _PointsPerPage = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize); // A4 paper logic
|
||||
float _PointsPerPage = 792;
|
||||
// if this document style has another style that is for pages other than first, we need to
|
||||
// reset the document style off of this section AND reset docstyle values used.
|
||||
@@ -1669,7 +1671,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
if (MyItemInfo.IsHigh && MyItemInfo.MyPrevious != null && ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS))
|
||||
yPageStart -= SixLinesPerInch;
|
||||
if (MyPageHelper.ParaBreaks.Count > 0 && MyPageHelper.ParaBreaks[0].CompressFirstPartOfStep)
|
||||
if (MyPageHelper.ParaBreaks.Count > 0 && MyPageHelper.ParaBreaks[0].CompressFirstPartOfStep)
|
||||
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
|
||||
if (CompressFoldout)
|
||||
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
|
||||
@@ -1704,6 +1706,7 @@ namespace Volian.Print.Library
|
||||
if (MyItemInfo.IsSection && MyParent != null && MyParent.MyItemInfo.IsSection && (MyItemInfo as SectionInfo).IsSeparatePagination())
|
||||
{
|
||||
RefreshDocStyle();
|
||||
//yTopMargin = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // C2018-003 fixed use of getting the active section // A4 paper logic
|
||||
yTopMargin = 792 - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // C2018-003 fixed use of getting the active section
|
||||
yBottomMargin = Math.Max(0, yTopMargin - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.PageLength); // C2018-003 fixed use of getting the active section
|
||||
yPageStart = yTopMargin;
|
||||
@@ -2800,6 +2803,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (MyItemInfo.ActiveSection != null && (MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst) // C2018-003 fixed use of getting the active section
|
||||
{
|
||||
//float localYTopMargin = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // A4 paper logic
|
||||
float localYTopMargin = 792 - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin;
|
||||
yBtmMarginForMsg = Math.Max(0, localYTopMargin - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.PageLength);
|
||||
}
|
||||
@@ -2810,6 +2814,7 @@ namespace Volian.Print.Library
|
||||
// B2019-079: Account for compression when locating the bottom continue message
|
||||
if (MyPageHelper.YMultiplier != 1)
|
||||
{
|
||||
//float topOfPage = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.MyDocStyle.Layout.TopMargin; // A4 paper logic
|
||||
float topOfPage = 792 - (float)MyItemInfo.MyDocStyle.Layout.TopMargin;
|
||||
yLocation = topOfPage - (topOfPage - yLocation) * MyPageHelper.YMultiplier;
|
||||
}
|
||||
|
Reference in New Issue
Block a user