
Changed how page length was determined when deciding how to paginate a procedure for processing VCSummer data Utilized FixedMessage property for processing VCSummer data Utilized DocStyle.LandscapePageList property for processing VCSummer data Added gap in centerline for boxes for processing VCSummer data Changed ToPdf method to pass yTopMargin and yBottomMargin by reference Chnaged calls to ToPdf method to pass yTopMargin and yBottomMargin by reference Changed how vlnParagraph was processed with regards to Notes and Caution boxes to support nuances in VCSummer data Added code to support macro substitutions in continue messages and end of procedure messages for processing VCSummer data Added drawing centerline and handling gaps in centerline for processing VCSummer data Added RomanNumbering of pages for processing VCSummer data Added classes Gap and Gaps for processing VCSummer data Utilized MacroTabAdjust property for processing VCSummer data Changed how vlnText width was calculated for processing VCSummer data
54 lines
1.5 KiB
C#
54 lines
1.5 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 vlnText : vlnPrintObject
|
|
{
|
|
//public float Width
|
|
//{
|
|
// get { return _CharsToTwips * Text.Length; }
|
|
//}
|
|
private string _Text;
|
|
public string Text
|
|
{
|
|
get { return _Text; }
|
|
set { _Text = value; }
|
|
}
|
|
private VE_Font _MyFont;
|
|
public VE_Font MyFont
|
|
{
|
|
get { return _MyFont; }
|
|
set { _MyFont = value; }
|
|
}
|
|
public vlnText(PdfContentByte cb, vlnParagraph myparent, string origText, string cleanText, float xoffset, float yoffset, VE_Font vFont)
|
|
{
|
|
MyContentByte = cb;
|
|
MyParent = myparent;
|
|
YOffset = yoffset;
|
|
Text = cleanText;
|
|
Rtf = GetRtf(origText, vFont);
|
|
XOffset = xoffset;
|
|
MyFont = vFont;
|
|
Width = MyFont.CharsToTwips * (Text.Length + 5);
|
|
}
|
|
public vlnText()
|
|
{
|
|
}
|
|
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
|
{
|
|
// The END message was not printing for NSP. The yLocation was getting set to a negative number, thus printing off the page.
|
|
// Found that the YOffset, cacluated when the bottom message was created, is really the actual location, at least in this case.
|
|
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
|
if (yLocation < 0) yLocation = YOffset;
|
|
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, "", yBottomMargin);
|
|
return yPageStart;
|
|
}
|
|
}
|
|
}
|