using System; using System.Collections.Generic; using System.Text; using System.Drawing; using iTextSharp.text.pdf; using iTextSharp.text; using VEPROMS.CSLA.Library; namespace Volian.Print.Library { public partial class vlnHeader : vlnPrintObject { public float HeaderWidth { get { return _WidthAdjust + (_CharsToTwips * HeaderText.Length); } } private string _HeaderText; public string HeaderText { get { return _HeaderText; } set { _HeaderText = value; } } private VE_Font _MyFont; public VE_Font MyFont { get { return _MyFont; } set { _MyFont = value; } } private ContentAlignment _ContentAlignment; public ContentAlignment ContentAlignment { get { return _ContentAlignment; } set { _ContentAlignment = value; } } public vlnHeader(vlnParagraph myParent, PdfContentByte cb, string origStr, string cleanStr, float xoffset, float yoffset, VE_Font vFont, System.Drawing.ContentAlignment ca) { MyParent = myParent; MyContentByte = cb; YOffset = yoffset; Width = MyParent.Width; HeaderText = cleanStr; Rtf = GetRtf(origStr, vFont); XOffset = xoffset; MyFont = vFont; ContentAlignment = ca; } public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin) { float yLocation = CalculateYOffset(yPageStart, yTopMargin); Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, HeaderWidth, 100, ""); return yPageStart; } } }