Changed base font to Arial 12
Added two lines (24 Points) to the Page Length Account for RNOOnly Continue when determining page break location Fixed logic to limit the location of the bottom Continue Message
This commit is contained in:
@@ -405,7 +405,8 @@ namespace Volian.Print.Library
|
||||
float ySpaceOnCurPageSave = ySpaceOnCurPage;
|
||||
ySpaceOnCurPage -= myBottomMsgSpace;
|
||||
vlnParagraph lastBreak = paraBreak;
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace);
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
|
||||
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
|
||||
//Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release
|
||||
if (paraBreak == null)
|
||||
{
|
||||
@@ -463,19 +464,26 @@ namespace Volian.Print.Library
|
||||
/// <param name="yTop"></param>
|
||||
/// <param name="myList"></param>
|
||||
/// <returns></returns>
|
||||
private static vlnParagraph FindPageBreak(float yStart, float yUpperLimit, float yLowerLimit, StepLevelList myList, vlnParagraph lastBreak, float fullPage)
|
||||
private static vlnParagraph FindPageBreak(float yStart, float yUpperLimit, float yLowerLimit, StepLevelList myList, vlnParagraph lastBreak, float fullPage,
|
||||
float myBottomMsgSpace,bool RNOContinueOnly)
|
||||
{
|
||||
vlnParagraph minPara = null;
|
||||
//StringBuilder minBuff = new StringBuilder();
|
||||
float? yLocationMin=null;
|
||||
vlnParagraph minPara2 = null;
|
||||
float? yLocationMin2=null;
|
||||
float yAddForBtmMsg = 0;
|
||||
foreach (int stepLevel in myList.Keys) // loop thru StepLevels, starting with lowest.
|
||||
{
|
||||
foreach (float yLocation in myList[stepLevel].Keys) // loop thru yLocation
|
||||
{
|
||||
float spaceOnPage = yUpperLimit + yLocation;
|
||||
vlnParagraph myPara = myList[stepLevel][yLocation];
|
||||
if (RNOContinueOnly && !myPara.MyItemInfo.IsInRNO)
|
||||
yAddForBtmMsg = myBottomMsgSpace;
|
||||
else
|
||||
yAddForBtmMsg = 0;
|
||||
spaceOnPage += yAddForBtmMsg;
|
||||
// The following lines were added for Comanche Peak ECA-TP-11-001A.SProcedure Steps.S17 (Printed as Step 12)
|
||||
if (spaceOnPage > 0 && myPara.YSize > fullPage && myPara.ChildrenRight != null && myPara.ChildrenRight.Count > 0
|
||||
&& myPara.ChildrenRight[0].YSize <= fullPage && myPara.ChildrenRight[0].YSize > spaceOnPage)
|
||||
@@ -486,7 +494,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
// The following lines were added for Comanche Peak ECA-0.1A.SProcedure Steps.S17 (Printed as Step 12)
|
||||
vlnParagraph myParent = myPara.MyParent;
|
||||
spaceOnPage = yUpperLimit + myPara.YTop + yLocation - myParent.YTop;
|
||||
spaceOnPage = yAddForBtmMsg + yUpperLimit + myPara.YTop + yLocation - myParent.YTop;
|
||||
if (spaceOnPage > 0 && myParent != lastBreak && myParent.YSize > fullPage && myParent.ChildrenRight != null && myParent.ChildrenRight.Count > 0
|
||||
&& myParent.ChildrenRight[0].YSize <= fullPage && myParent.ChildrenRight[0].YSize > spaceOnPage)
|
||||
{
|
||||
@@ -543,7 +551,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
if (myPara.MyParent.YTop == myPara.YTop) myPara = myPara.MyParent;
|
||||
if (wcnChkLstBorder -yLocation <= yUpperLimit) // Fix for OFN-RJ-23
|
||||
if (wcnChkLstBorder -yLocation <= yUpperLimit+yAddForBtmMsg) // Fix for OFN-RJ-23
|
||||
//if (-yLocation < yUpperLimit) // Before
|
||||
//if (-yLocation < yWithinMargins && myList[stepLevel][yLocation].MyItemInfo.MyPrevious != null)
|
||||
{
|
||||
|
@@ -330,7 +330,7 @@ namespace Volian.Print.Library
|
||||
yPageStart = yTopMargin + YTopMost;
|
||||
}
|
||||
else
|
||||
yPageStart = yTopMargin + YOffset;
|
||||
yPageStart = yTopMargin + YOffset;
|
||||
}
|
||||
else
|
||||
yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
@@ -915,6 +915,11 @@ namespace Volian.Print.Library
|
||||
{
|
||||
case E_ContBottomLoc.EndOfText: // place continue string at end of text
|
||||
msg_yLocation = msg_yLocation + yLocation - SixLinesPerInch;
|
||||
if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation)
|
||||
{ // Adjusted Continue Message Y Offset
|
||||
//DebugPagination.WriteLine("====>> {0},'{1}'", msg_yLocation, MyItemInfo.ShortPath);
|
||||
msg_yLocation = yBottomMargin + (docstyle.Layout.FooterLength ?? 0);
|
||||
}
|
||||
break;
|
||||
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
|
||||
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; (need this for IP3)
|
||||
@@ -930,7 +935,7 @@ namespace Volian.Print.Library
|
||||
msg_yLocation = Math.Max(msg_yLocation + yLocation - SixLinesPerInch, yBottomMargin + SixLinesPerInch);
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("**** BOTTOM CONTINUE MESSAGE NOT CODED*****");
|
||||
_MyLog.WarnFormat("**** BOTTOM CONTINUE MESSAGE NOT CODED FOR LOCATION {0}*****", docstyle.Continue.Bottom.Location);
|
||||
break;
|
||||
}
|
||||
if (!PageBreakOnStep)
|
||||
|
Reference in New Issue
Block a user