2011-05-19 13:36:09 +00:00

36 lines
983 B
C#

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: vlnText
{
public float HeaderWidth
{
get { return _WidthAdjust + (MyFont.CharsToTwips * Text.Length); }
}
public vlnHeader(vlnParagraph myParent, PdfContentByte cb, string origStr, string cleanStr, float xoffset, float yoffset, VE_Font vFont)
{
MyParent = myParent;
MyContentByte = cb;
YOffset = yoffset;
Width = MyParent.Width;
Text = cleanStr;
Rtf = GetRtf(origStr, vFont);
XOffset = xoffset;
MyFont = vFont;
}
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, "", yBottomMargin);
return yPageStart;
}
}
}