Added Unit Specif logic
Added “Final Page” logic Added “Final Page” logic, fixed PDF compare where it wasn’t finding the file in the Compare folder Added Caution and Note boxes for Turkey Point Null check and logic for PosAdjust format variable Added “Final Page” message logic Fix to get proper with of tabs containing a solid bullet
This commit is contained in:
@@ -57,7 +57,14 @@ namespace Volian.Print.Library
|
||||
get { return _MyMacro; }
|
||||
set { _MyMacro = value; }
|
||||
}
|
||||
|
||||
|
||||
private float GetTextWidth(VE_Font vefont, string txt)
|
||||
{
|
||||
System.Drawing.Font font = new System.Drawing.Font(vefont.Family, (float)vefont.Size);
|
||||
iTextSharp.text.Font iFont = Volian.Svg.Library.VolianPdf.GetFont(font);
|
||||
float w = iFont.BaseFont.GetWidthPointKerned(Text.Replace("\u25CF","@"), (float)vefont.Size);
|
||||
return w;
|
||||
}
|
||||
public vlnTab(PdfContentByte cb, vlnParagraph myparent, string origTab, string cleanTab, float xoffset, float yoffset, VE_Font vFont, bool doSectTab)
|
||||
{
|
||||
MyContentByte = cb;
|
||||
@@ -65,7 +72,7 @@ namespace Volian.Print.Library
|
||||
YOffset = yoffset;
|
||||
Text = cleanTab;
|
||||
MyFont = vFont;
|
||||
Width = MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
Width = GetTextWidth(MyFont, (Text != null ? Text : origTab));//MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
if (origTab.Contains(@"{!"))
|
||||
{
|
||||
int mindx = origTab.IndexOf(@"{!");
|
||||
@@ -77,10 +84,10 @@ namespace Volian.Print.Library
|
||||
origTab = origTab.Replace(macro,"");
|
||||
origTab = origTab + " ";
|
||||
cleanTab = origTab;
|
||||
Width = MyFont.CharsToTwips * (cleanTab != null ? cleanTab.Length : origTab.Length);
|
||||
Width = GetTextWidth(MyFont, (cleanTab != null ? cleanTab : origTab));//MyFont.CharsToTwips * (cleanTab != null ? cleanTab.Length : origTab.Length);
|
||||
}
|
||||
Rtf = GetRtf(origTab, vFont);
|
||||
Rtf = Rtf.Replace("\u25CF", @"\f1\u9679?\f0"); // bullet 25CF
|
||||
Rtf = Rtf.Replace("\u25CF", @"\f1\u9679?\f0"); // bullet 25CF // jsj- add space after \f0
|
||||
if (myparent.MyItemInfo.FormatStepData != null && !myparent.MyItemInfo.FormatStepData.AlwaysTab && myparent.MyItemInfo.MyPrevious != null)
|
||||
{
|
||||
Rtf = Rtf.Replace("Caution:", " ");
|
||||
@@ -99,7 +106,16 @@ namespace Volian.Print.Library
|
||||
if (doSectTab)
|
||||
XOffset = xoffset;
|
||||
else
|
||||
{
|
||||
//if (MyFont.Family == "Arial" && MyFont.Size == 14)
|
||||
//{
|
||||
// System.Drawing.Font font = new System.Drawing.Font("Arial", 14);
|
||||
// iTextSharp.text.Font iFont = Volian.Svg.Library.VolianPdf.GetFont(font);
|
||||
// float w = iFont.BaseFont.GetWidthPointKerned(Text, 14);
|
||||
// Width = w;
|
||||
//}
|
||||
XOffset = xoffset - Width;
|
||||
}
|
||||
|
||||
}
|
||||
public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||
|
Reference in New Issue
Block a user