49 lines
1.6 KiB
C#
49 lines
1.6 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; }
|
|
}
|
|
private bool _ExtendChangeBar;
|
|
public bool ExtendChangeBar
|
|
{
|
|
get { return _ExtendChangeBar; }
|
|
set { _ExtendChangeBar = 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, FormatInfo formatInfo, bool extendChangeBar)
|
|
{
|
|
ExtendChangeBar = formatInfo.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeBarToRNOSep ? extendChangeBar : false;
|
|
YOffset = yoffset;
|
|
XOffset = xoffset;
|
|
_MyParent = parent;
|
|
if (sepStr != null)
|
|
Rtf = GetRtf(sepStr, formatInfo.PlantFormat.FormatData.Font);
|
|
else
|
|
Rtf = "--------------------------"; //TODO - What should this be: is this Ctrl-A?
|
|
MyFont = formatInfo.PlantFormat.FormatData.Font;
|
|
Width = sepStr.Length * MyFont.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;
|
|
}
|
|
}
|
|
}
|