This commit is contained in:
@@ -79,7 +79,6 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private float GetTextWidth(VE_Font vefont, string txt, string symblFontName)
|
||||
{
|
||||
|
||||
System.Drawing.Font font = new System.Drawing.Font(vefont.Family, (float)vefont.Size, GetSysFontStyle(vefont));
|
||||
System.Drawing.Font symbFont = new System.Drawing.Font(symblFontName, (float)vefont.Size);
|
||||
iTextSharp.text.Font iFont = Volian.Svg.Library.VolianPdf.GetFont(font);
|
||||
@@ -131,11 +130,21 @@ namespace Volian.Print.Library
|
||||
Width = (float)myparent.MyItemInfo.FormatStepData.TabData.IdentWidth;
|
||||
else if (CCCs != IIIs)
|
||||
{
|
||||
origTab1 = origTab1.TrimStart(" ".ToCharArray());
|
||||
// 6 = number of points per character. 4 characters between end of tab and beginning of text
|
||||
// origTab1.Trim... is number of non-space characters of the tab string.
|
||||
// Tested for FPL & NSP
|
||||
Width = 6 * (4+origTab1.Trim(" ".ToCharArray()).Length);
|
||||
if (myparent.MyItemInfo.ActiveFormat.Name.Contains("SHE")) // Temporary for SHE development. need better way to do this check
|
||||
{
|
||||
if (myparent.MyItemInfo.IsHigh)
|
||||
Width = 6 * origTab.Length;
|
||||
else
|
||||
Width = GetTextWidth(MyFont, (Text != null ? Text : origTab), symblFontName); //MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
origTab1 = origTab1.TrimStart(" ".ToCharArray());
|
||||
// 6 = number of points per character. 4 characters between end of tab and beginning of text
|
||||
// origTab1.Trim... is number of non-space characters of the tab string.
|
||||
// Tested for FPL & NSP
|
||||
Width = 6 * (4 + origTab1.Trim(" ".ToCharArray()).Length);
|
||||
}
|
||||
}
|
||||
else
|
||||
Width = GetTextWidth(MyFont, (Text != null ? Text : origTab), symblFontName); //MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
@@ -264,7 +273,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
|
||||
}
|
||||
public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
||||
{
|
||||
if (MyParent.MyItemInfo.FormatStepData != null && MyParent.MyItemInfo.FormatStepData.StepPrintData != null)
|
||||
XOffset += (float)(MyParent.MyItemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
||||
|
Reference in New Issue
Block a user