If header includes leading spaces, include those in size of header (AEP has spaces in front of OR
Use ‘RNOWidthAltAll’ (for AEP)
This commit is contained in:
@@ -10,6 +10,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
public partial class vlnHeader: vlnText
|
public partial class vlnHeader: vlnText
|
||||||
{
|
{
|
||||||
|
private string _OrigStr;
|
||||||
public float HeaderWidth
|
public float HeaderWidth
|
||||||
{
|
{
|
||||||
get { return _WidthAdjust + (MyFont.CharsToTwips * Text.Length); }
|
get { return _WidthAdjust + (MyFont.CharsToTwips * Text.Length); }
|
||||||
@@ -21,6 +22,7 @@ namespace Volian.Print.Library
|
|||||||
YOffset = yoffset;
|
YOffset = yoffset;
|
||||||
Width = MyParent.Width;
|
Width = MyParent.Width;
|
||||||
Text = cleanStr;
|
Text = cleanStr;
|
||||||
|
_OrigStr = (origStr.StartsWith(" ") && !origStr.Contains(@"\"))?origStr:null;
|
||||||
Rtf = GetRtf(origStr, vFont);
|
Rtf = GetRtf(origStr, vFont);
|
||||||
XOffset = xoffset;
|
XOffset = xoffset;
|
||||||
MyFont = vFont;
|
MyFont = vFont;
|
||||||
@@ -31,6 +33,7 @@ namespace Volian.Print.Library
|
|||||||
int fontStyle = (MyFont.WindowsFont.Bold ? iTextSharp.text.Font.BOLD : 0) + (MyFont.WindowsFont.Italic ? iTextSharp.text.Font.ITALIC : 0);
|
int fontStyle = (MyFont.WindowsFont.Bold ? iTextSharp.text.Font.BOLD : 0) + (MyFont.WindowsFont.Italic ? iTextSharp.text.Font.ITALIC : 0);
|
||||||
iTextSharp.text.Font itextFont = Volian.Svg.Library.Svg.GetFont(fontFace, MyFont.WindowsFont.Size, fontStyle, System.Drawing.Color.Black);
|
iTextSharp.text.Font itextFont = Volian.Svg.Library.Svg.GetFont(fontFace, MyFont.WindowsFont.Size, fontStyle, System.Drawing.Color.Black);
|
||||||
float hdrwidth = itextFont.BaseFont.GetWidthPoint(Text, MyFont.WindowsFont.Size);
|
float hdrwidth = itextFont.BaseFont.GetWidthPoint(Text, MyFont.WindowsFont.Size);
|
||||||
|
if (_OrigStr != null) hdrwidth = itextFont.BaseFont.GetWidthPoint(_OrigStr, MyFont.WindowsFont.Size);
|
||||||
hdrwidth += 5;
|
hdrwidth += 5;
|
||||||
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
||||||
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, hdrwidth, 100, "", yBottomMargin);
|
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, hdrwidth, 100, "", yBottomMargin);
|
||||||
|
@@ -4836,6 +4836,16 @@ namespace Volian.Print.Library
|
|||||||
// 72 points / inch - 7 inches (about width of page)
|
// 72 points / inch - 7 inches (about width of page)
|
||||||
Width = 72 * 7;
|
Width = 72 * 7;
|
||||||
}
|
}
|
||||||
|
else if (itemInfo.IsRNOPart && itemInfo.MyActiveSection.ColumnMode != 0 && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAltAll != null)
|
||||||
|
{
|
||||||
|
// This code was added for AEP. Other code that adjusted RNO widths was only adjusting the RNO widths
|
||||||
|
// off of the HLS. AEP needed adjusting for all RNOs.
|
||||||
|
float ovrd = (float)itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAltAll;
|
||||||
|
if (ovrd > 0)
|
||||||
|
Width = ovrd - tabWidth;
|
||||||
|
if (XOffset + Width > (float)itemInfo.MyDocStyle.Layout.PageWidth)
|
||||||
|
Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - XOffset - 5;
|
||||||
|
}
|
||||||
else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh)
|
else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh)
|
||||||
{
|
{
|
||||||
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAdj != null && !((ItemInfo)itemInfo.ActiveParent).IsInRNO)
|
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAdj != null && !((ItemInfo)itemInfo.ActiveParent).IsInRNO)
|
||||||
|
Reference in New Issue
Block a user