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:
parent
651266e7c8
commit
63acad915d
@ -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)
|
||||
|
@ -24,6 +24,7 @@ namespace fmtxml
|
||||
// Fix Logic for CAPSPIfLastLower
|
||||
fmtdata.ROData.CapRoIfLastLower = "False";
|
||||
fmtdata.ROData.CapSPIfLastLower = "True";
|
||||
fmtdata.FontData.FontSize = "12";
|
||||
//fmtdata.SectData.StepSectionData.StpSectLayData.Separator.SeparatorLocation = 2;
|
||||
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -3;
|
||||
// ColS="42" WidT="454" ColRTable="0,264,138" WidSTableEdit="432,221,120" WidSTablePrint="480,221,120"
|
||||
@ -41,14 +42,22 @@ namespace fmtxml
|
||||
|
||||
// High
|
||||
fmtdata.StepData[2].StepLayoutData.STExtraSpace = "12";
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < fmtdata.StepData.Length; i++)
|
||||
{
|
||||
if (fmtdata.StepData[i].Font != null && fmtdata.StepData[i].Font.FontFamily == "Arial")
|
||||
fmtdata.StepData[i].Font.FontSize = "12";
|
||||
if (fmtdata.StepData[i].TabData.Font.FontFamily == "Arial")
|
||||
fmtdata.StepData[i].TabData.Font.FontSize = "12";
|
||||
}
|
||||
|
||||
// caution separator
|
||||
//fmtdata.StepData[6].StepLayoutData.STBoxindex = "1";
|
||||
fmtdata.StepData[6].TabData.Bullet.Separate = "True";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font = new VE_Font();
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontFamily = "Arial";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontSize = "11";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontSize = "12";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontStyle = "none";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.CPI = "12";
|
||||
|
||||
@ -60,7 +69,7 @@ namespace fmtxml
|
||||
fmtdata.StepData[7].TabData.Bullet.Separate = "True";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font = new VE_Font();
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontFamily = "Arial";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontSize = "11";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontSize = "12";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontStyle = "none";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.CPI = "12";
|
||||
|
||||
@ -72,7 +81,7 @@ namespace fmtxml
|
||||
|
||||
// RNOType
|
||||
fmtdata.StepData[40].Font.FontFamily = "Arial";
|
||||
fmtdata.StepData[40].Font.FontSize = "11";
|
||||
fmtdata.StepData[40].Font.FontSize = "12";
|
||||
fmtdata.StepData[40].StepLayoutData.STExtraSpace = "0";
|
||||
|
||||
//// note location (create a box to locate it)
|
||||
@ -157,12 +166,30 @@ namespace fmtxml
|
||||
|
||||
private void AddCATDOC(ref DocStyles dcstyles)
|
||||
{
|
||||
SetCatawbaDocStyleFont(ref dcstyles);
|
||||
dcstyles.DcStyles[0].CBMargin = 50;
|
||||
//dcstyles.DcStyles[0].CBLoc = 3;
|
||||
dcstyles.DcStyles[0].PageLength = 624;
|
||||
dcstyles.DcStyles[1].CBMargin = 50;
|
||||
//dcstyles.DcStyles[1].CBLoc = 3;
|
||||
dcstyles.DcStyles[1].PageLength = 624;
|
||||
dcstyles.DcStyles[2].CBMargin = 50;
|
||||
//dcstyles.DcStyles[2].CBLoc = 3;
|
||||
dcstyles.DcStyles[2].PageLength = 624;
|
||||
}
|
||||
private static void SetCatawbaDocStyleFont(ref DocStyles dcstyles)
|
||||
{
|
||||
int i = 0;
|
||||
int ii = 0;
|
||||
// Set font to Arial 12 pt
|
||||
for (i = 0; i < dcstyles.DcStyles.Length; i++)
|
||||
{
|
||||
dcstyles.DcStyles[i].dstyle.FontFamily = "Arial";
|
||||
dcstyles.DcStyles[i].dstyle.FontSize = "12";
|
||||
dcstyles.DcStyles[i].ContStyle.FontFamily = "Arial";
|
||||
dcstyles.DcStyles[i].ContStyle.FontSize = "12";
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
public partial class RtfToSvg
|
||||
|
@ -12,6 +12,7 @@ namespace fmtxml
|
||||
// Fix Logic for CAPSPIfLastLower
|
||||
fmtdata.ROData.CapRoIfLastLower = "False";
|
||||
fmtdata.ROData.CapSPIfLastLower = "True";
|
||||
fmtdata.FontData.FontSize = "12";
|
||||
//fmtdata.SectData.StepSectionData.StpSectLayData.Separator.SeparatorLocation = 2;
|
||||
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -3;
|
||||
// ColS="42" WidT="454" ColRTable="0,264,138" WidSTableEdit="432,221,120" WidSTablePrint="480,221,120"
|
||||
@ -29,13 +30,20 @@ namespace fmtxml
|
||||
|
||||
// High
|
||||
fmtdata.StepData[2].StepLayoutData.STExtraSpace = "12";
|
||||
|
||||
|
||||
for (int i = 0; i < fmtdata.StepData.Length; i++)
|
||||
{
|
||||
if (fmtdata.StepData[i].Font != null && fmtdata.StepData[i].Font.FontFamily == "Arial")
|
||||
fmtdata.StepData[i].Font.FontSize = "12";
|
||||
if (fmtdata.StepData[i].TabData.Font.FontFamily == "Arial")
|
||||
fmtdata.StepData[i].TabData.Font.FontSize = "12";
|
||||
}
|
||||
// caution separator
|
||||
//fmtdata.StepData[6].StepLayoutData.STBoxindex = "1";
|
||||
fmtdata.StepData[6].TabData.Bullet.Separate = "True";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font = new VE_Font();
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontFamily = "Arial";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontSize = "11";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontSize = "12";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.FontStyle = "none";
|
||||
fmtdata.StepData[6].TabData.Bullet.Font.CPI = "12";
|
||||
|
||||
@ -47,7 +55,7 @@ namespace fmtxml
|
||||
fmtdata.StepData[7].TabData.Bullet.Separate = "True";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font = new VE_Font();
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontFamily = "Arial";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontSize = "11";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontSize = "12";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.FontStyle = "none";
|
||||
fmtdata.StepData[7].TabData.Bullet.Font.CPI = "12";
|
||||
|
||||
@ -59,7 +67,7 @@ namespace fmtxml
|
||||
|
||||
// RNOType
|
||||
fmtdata.StepData[40].Font.FontFamily = "Arial";
|
||||
fmtdata.StepData[40].Font.FontSize = "11";
|
||||
fmtdata.StepData[40].Font.FontSize = "12";
|
||||
fmtdata.StepData[40].StepLayoutData.STExtraSpace = "0";
|
||||
|
||||
// note location (create a box to locate it)
|
||||
@ -149,13 +157,31 @@ namespace fmtxml
|
||||
}
|
||||
private void AddMCGDOC(ref DocStyles dcstyles)
|
||||
{
|
||||
SetMcGuireDocStyleFont(ref dcstyles);
|
||||
|
||||
dcstyles.DcStyles[0].CBMargin = 50;
|
||||
//dcstyles.DcStyles[0].CBLoc = 3;
|
||||
dcstyles.DcStyles[0].PageLength = 600;
|
||||
dcstyles.DcStyles[0].PageLength = 624;
|
||||
dcstyles.DcStyles[1].CBMargin = 50;
|
||||
//dcstyles.DcStyles[1].CBLoc = 3;
|
||||
dcstyles.DcStyles[1].PageLength = 624;
|
||||
dcstyles.DcStyles[2].CBMargin = 50;
|
||||
//dcstyles.DcStyles[2].CBLoc = 3;
|
||||
dcstyles.DcStyles[2].PageLength = 624;
|
||||
}
|
||||
private static void SetMcGuireDocStyleFont(ref DocStyles dcstyles)
|
||||
{
|
||||
int i = 0;
|
||||
int ii = 0;
|
||||
// Set font to Arial 12 pt
|
||||
for (i = 0; i < dcstyles.DcStyles.Length; i++)
|
||||
{
|
||||
dcstyles.DcStyles[i].dstyle.FontFamily = "Arial";
|
||||
dcstyles.DcStyles[i].dstyle.FontSize = "12";
|
||||
dcstyles.DcStyles[i].ContStyle.FontFamily = "Arial";
|
||||
dcstyles.DcStyles[i].ContStyle.FontSize = "12";
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
public partial class RtfToSvg
|
||||
|
Loading…
x
Reference in New Issue
Block a user