36 lines
977 B
C#
36 lines
977 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 + (_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;
|
|
}
|
|
}
|
|
}
|