42 lines
1.2 KiB
C#
42 lines
1.2 KiB
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 vlnRNOSeparator : vlnPrintObject
|
|
{
|
|
private VE_Font _MyFont;
|
|
public VE_Font MyFont
|
|
{
|
|
get { return _MyFont; }
|
|
set { _MyFont = value; }
|
|
}
|
|
/* if flag set and separator defined then output separator */
|
|
/*if separator is a control-A use RNOSepLine*/
|
|
public vlnRNOSeparator(vlnParagraph parent, PdfContentByte cb, string sepStr, float xoffset, float yoffset, VE_Font vFont)
|
|
{
|
|
YOffset = yoffset;
|
|
XOffset = xoffset;
|
|
_MyParent = parent;
|
|
if (sepStr != null)
|
|
Rtf = GetRtf(sepStr, vFont);
|
|
else
|
|
Rtf = "--------------------------"; //TODO - What should this be: is this Ctrl-A?
|
|
MyFont = vFont;
|
|
Width = sepStr.Length * _CharsToTwips + _WidthAdjust;
|
|
}
|
|
public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
|
{
|
|
MyContentByte = cb;
|
|
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
|
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, "", yBottomMargin);
|
|
return yPageStart;
|
|
}
|
|
}
|
|
}
|