Added gap in centerline for grid for processing VCSummer data
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
This commit is contained in:
@@ -67,6 +67,7 @@ namespace Volian.Print.Library
|
||||
float right = (float)MyParent.MyItemInfo.MyDocStyle.Layout.LeftMargin + (float)(MyBox.End ?? DefEnd);
|
||||
iTextSharp.text.Color boxColor = new iTextSharp.text.Color(PrintOverride.OverrideBoxColor(System.Drawing.Color.Black));
|
||||
cb.SetColorStroke(boxColor);
|
||||
_MyPageHelper.MyGaps.Add(top, top - Height);
|
||||
if (DefBox != null)
|
||||
{
|
||||
cb.SetLineWidth(.6F);
|
||||
@@ -138,62 +139,62 @@ namespace Volian.Print.Library
|
||||
|
||||
private void DrawAsteriskTopBottom(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin, ref float top, ref float bottom, float left)
|
||||
{
|
||||
// this box is not drawn, it is a series of asterisks drawn above and below text.
|
||||
// For this box, there are no vertical edges (RGE uses this box type)
|
||||
top = CalculateYOffset(yPageStart, yTopMargin);
|
||||
// Bug fix B2013-091
|
||||
// added YMultiplier to handle compress pages
|
||||
// bottom row of asterisks was in non-compressed line location
|
||||
// this box is not drawn, it is a series of asterisks drawn above and below text.
|
||||
// For this box, there are no vertical edges (RGE uses this box type)
|
||||
top = CalculateYOffset(yPageStart, yTopMargin);
|
||||
// Bug fix B2013-091
|
||||
// added YMultiplier to handle compress pages
|
||||
// bottom row of asterisks was in non-compressed line location
|
||||
bottom = top - (Height * MyPageHelper.YMultiplier);
|
||||
|
||||
// create a new font without any styles such as underline.
|
||||
VE_Font vf = new VE_Font(MyParent.MyItemInfo.FormatStepData.Font.Family, (int)MyParent.MyItemInfo.FormatStepData.Font.Size, E_Style.None, (float)MyParent.MyItemInfo.FormatStepData.Font.CPI);
|
||||
|
||||
|
||||
// To find the length of the line, account for the length of the upper right corner also (BXURC)
|
||||
int urcLen = MyBox.BXHorz[MyBox.BXHorz.Length - 1] == ' ' && MyBox.BXURC[0] == ' ' ? 1 : MyBox.BXURC.Length;
|
||||
float endHorz = (float)MyBox.End - (float)MyBox.Start - (float)(urcLen * (72 / vf.CPI));
|
||||
|
||||
// Do the top line first:
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(MyBox.BXULC);
|
||||
float size = (float)(MyBox.BXULC.Length * (72 / vf.CPI));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(MyBox.BXULC);
|
||||
float size = (float)(MyBox.BXULC.Length * (72/vf.CPI));
|
||||
string bxstr = null;
|
||||
if (!ContainsPageBreak) // Only do top line if there is no page break.
|
||||
{
|
||||
while (size < endHorz)
|
||||
{
|
||||
sb.Append(MyBox.BXHorz);
|
||||
size = size + (float)(MyBox.BXHorz.Length * (72 / vf.CPI));
|
||||
}
|
||||
{
|
||||
sb.Append(MyBox.BXHorz);
|
||||
size = size + (float)(MyBox.BXHorz.Length * (72/vf.CPI));
|
||||
}
|
||||
// Tack on the right upper corner. For some formats, the upper right corner in the
|
||||
// had the first character as a space, this would put two spaces in a row at the
|
||||
// end of the string, so remove the space before tacking on the upper right corner:
|
||||
bxstr = sb.ToString();
|
||||
if (bxstr[bxstr.Length - 1] == ' ' && MyBox.BXURC[0] == ' ') bxstr = bxstr.TrimEnd();
|
||||
bxstr = bxstr + MyBox.BXURC;
|
||||
size = size + (float)((MyBox.BXURC.Length) * (72 / vf.CPI));
|
||||
Rtf = GetRtf(bxstr, vf);
|
||||
IParagraph = null; // set to null so that next access of IParagraph sets the Rtf.
|
||||
size = size + (float)((MyBox.BXURC.Length) * (72/vf.CPI));
|
||||
Rtf = GetRtf(bxstr, vf);
|
||||
IParagraph = null; // set to null so that next access of IParagraph sets the Rtf.
|
||||
Rtf2Pdf.TextAt(cb, IParagraph, left, top, size + 10, 100, "", yBottomMargin);
|
||||
}
|
||||
|
||||
// Handle the bottom line now:
|
||||
if (bottom < yBottomMargin) return; // Box goes off page, i.e. page break, don't do bottom
|
||||
|
||||
sb.Remove(0, sb.Length);
|
||||
sb.Append(MyBox.BXLLC);
|
||||
size = (float)(MyBox.BXLLC.Length * (72 / vf.CPI));
|
||||
|
||||
sb.Remove(0, sb.Length);
|
||||
sb.Append(MyBox.BXLLC);
|
||||
size = (float)(MyBox.BXLLC.Length * (72 / vf.CPI));
|
||||
while (size < endHorz)
|
||||
{
|
||||
sb.Append(MyBox.BXHorz);
|
||||
size = size + (float)(MyBox.BXHorz.Length * (72 / vf.CPI));
|
||||
}
|
||||
bxstr = sb.ToString().TrimEnd() + MyBox.BXLRC;
|
||||
size = size + (float)((MyBox.BXLRC.Length) * (72 / vf.CPI));
|
||||
Rtf = GetRtf(bxstr, vf);
|
||||
{
|
||||
sb.Append(MyBox.BXHorz);
|
||||
size = size + (float)(MyBox.BXHorz.Length * (72 / vf.CPI));
|
||||
}
|
||||
bxstr = sb.ToString().TrimEnd() + MyBox.BXLRC;
|
||||
size = size + (float)((MyBox.BXLRC.Length) * (72/vf.CPI));
|
||||
Rtf = GetRtf(bxstr, vf);
|
||||
IParagraph = null; // set to null so that next access of IParagraph sets the Rtf.
|
||||
Rtf2Pdf.TextAt(cb, IParagraph, left, bottom, size + 10, 100, "", yBottomMargin);
|
||||
}
|
||||
}
|
||||
private void DrawAsteriskSide(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin, float top, float bottom, float left, float right)
|
||||
{
|
||||
// set the top & bottom of sides. If there is a page break in the middle of box, adjust these.
|
||||
@@ -206,8 +207,8 @@ namespace Volian.Print.Library
|
||||
else
|
||||
{
|
||||
// to calculate the bottom, don't adjust the top yet.
|
||||
top = CalculateYOffset(yPageStart, yTopMargin);
|
||||
bottom = top - (Height * MyPageHelper.YMultiplier);
|
||||
top = CalculateYOffset(yPageStart, yTopMargin);
|
||||
bottom = top - (Height * MyPageHelper.YMultiplier);
|
||||
top = yTopMargin; // reset top to top margin since there was a page break.
|
||||
}
|
||||
|
||||
@@ -228,7 +229,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
Rtf2Pdf.TextAt(cb, IParagraph, left, vertDiff, width, height, "", yBottomMargin);
|
||||
vertDiff -= (SixLinesPerInch * MyPageHelper.YMultiplier);
|
||||
}
|
||||
}
|
||||
|
||||
// right side:
|
||||
vertDiff = top - (SixLinesPerInch * MyPageHelper.YMultiplier);
|
||||
|
Reference in New Issue
Block a user