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:
parent
eacd97f0fa
commit
cb5a88ea6f
@ -1383,7 +1383,7 @@ public string Path
|
||||
// B2019-109 Adjusted width of cell to match edit cell
|
||||
myColumnText1.SetSimpleColumn(.5F + left + x, top - y - h, left + x + w - 1.5F, 3 + top - y - hAdjust - adjustTextLocation); // 2 == Default Padding
|
||||
// B2018-003 - RHM 20180319 Change Debug Output
|
||||
string dbg = string.Format("Row={0}, Col={1}, Leading={2}, SpacingBefore={3}", r1, c1, MyPara.TotalLeading, MyPara.SpacingBefore);
|
||||
string dbg = string.Format("Row={0}, Col={1}, Leading={2}, SpacingBefore={3}", r1, c1, MyPara.TotalLeading * _MyPageHelper.YMultiplier, MyPara.SpacingBefore);
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Added Header to debug output
|
||||
if (ShowDetails)
|
||||
|
@ -768,6 +768,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private float GetYPageSizeUseOnAllButFirstPage()
|
||||
{
|
||||
//float _PointsPerPage = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize); // A4 paper logic
|
||||
float _PointsPerPage = 792;
|
||||
int indx = (int)MyItemInfo.MyDocStyle.IndexOtherThanFirstPage;
|
||||
foreach (DocStyle ds in MyItemInfo.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
|
||||
@ -1564,7 +1565,7 @@ 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)
|
||||
if ((-yLocation + yStart) >= yLowerLimit) // Only if it is more than the lower limit
|
||||
if ((-yLocation + yStart) >= yLowerLimit && !myPara.HasSecondRNOThatWillFit(yStart, yLowerLimit, yUpperLimit ,myList, stepLevel)) // Only if it is more than the lower limit // B2020-013 if it has a second RNO see if it will fit - Callaway OTO-AC-00002 step 2
|
||||
return myPara;
|
||||
// B2019-103, B2019-114 Break at a step if the step will fit on a page by itself and it will
|
||||
// not fit in the current pagee
|
||||
@ -1601,6 +1602,25 @@ namespace Volian.Print.Library
|
||||
//if(minPara2 != null) DebugPagination.WriteLine("### n222222 {0}", minPara2);
|
||||
return minPara ?? minPara2;
|
||||
}
|
||||
|
||||
// B2020-013 premature break in RNO column - Callaway OTO-AC-00002 step 2
|
||||
private bool HasSecondRNOThatWillFit(float yStart, float yLowerLimit, float yUpperLimit, StepLevelList myList, int stepLevel)//float ystart, float ylowerlimit)
|
||||
{
|
||||
if (!MyItemInfo.IsInRNO || stepLevel+1 >= myList.Count)
|
||||
return false; // does not have second RNO
|
||||
vlnParagraph tmp = this;
|
||||
// see there there is a second RNO then see if it will fit on the page
|
||||
while (!tmp.MyItemInfo.IsRNOPart) tmp = tmp.MyParent;
|
||||
if (tmp.MyItemInfo.RNOs != null && tmp.MyItemInfo.RNOs.Count > 0)
|
||||
{
|
||||
foreach (float yLocation in myList[stepLevel+1].Keys) // loop thru yLocation from pagination list
|
||||
{
|
||||
if ((-yLocation + yStart) >= yLowerLimit)
|
||||
return true; // has a second RNO that will fit
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private static bool StepWillFitOnBlankPageButNotOnCurrentPage(vlnParagraph myPara, float yLocation, float yStart,float fullPage)
|
||||
{
|
||||
// B2019-150 & B2019-151 Pagination Bugs Seen for Summer EOP4.1 Step 10 and
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user