This commit is contained in:
parent
1d84dd29e3
commit
1b1e5668d1
@ -47,9 +47,8 @@ namespace Volian.Print.Library
|
|||||||
//Console.WriteLine("'{0}','{1}'", CharToAsc(MyBox.BoxStyle), MyParent.MyItemInfo.ShortPath);
|
//Console.WriteLine("'{0}','{1}'", CharToAsc(MyBox.BoxStyle), MyParent.MyItemInfo.ShortPath);
|
||||||
float top = CalculateYOffset(yPageStart, yTopMargin) - (7*MyPageHelper.YMultiplier);
|
float top = CalculateYOffset(yPageStart, yTopMargin) - (7*MyPageHelper.YMultiplier);
|
||||||
float bottom = top - (Height * MyPageHelper.YMultiplier);
|
float bottom = top - (Height * MyPageHelper.YMultiplier);
|
||||||
float leftmargin = (float)MyParent.MyItemInfo.MyDocStyle.Layout.LeftMargin + 3;
|
float left = (float)((MyBox.Start ?? 0) + MyParent.MyItemInfo.MyDocStyle.Layout.LeftMargin);
|
||||||
float left = (float)(MyBox.Start == null ? MyParent.MyItemInfo.MyDocStyle.Layout.LeftMargin : leftmargin + MyBox.Start);
|
float right = (float)MyParent.MyItemInfo.MyDocStyle.Layout.LeftMargin + (float)(MyBox.End ?? DefEnd);
|
||||||
float right = leftmargin + (float)(MyBox.End ?? DefEnd);
|
|
||||||
iTextSharp.text.Color boxColor = new iTextSharp.text.Color(PrintOverride.OverrideBoxColor(System.Drawing.Color.Black));
|
iTextSharp.text.Color boxColor = new iTextSharp.text.Color(PrintOverride.OverrideBoxColor(System.Drawing.Color.Black));
|
||||||
cb.SetColorStroke(boxColor);
|
cb.SetColorStroke(boxColor);
|
||||||
if (DefBox != null)
|
if (DefBox != null)
|
||||||
@ -70,11 +69,13 @@ namespace Volian.Print.Library
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// For other than OHLP/HLP. For those not matching the HLP Boxes
|
// For other than OHLP/HLP. For those not matching the HLP Boxes
|
||||||
throw new Exception("Missing vlnBox handler");
|
Console.WriteLine("NO BOXES");
|
||||||
|
break;
|
||||||
|
//throw new Exception("Missing vlnBox handler");
|
||||||
}
|
}
|
||||||
const float llxOffset = 3;
|
const float llxOffset = 3;
|
||||||
cb.SetLineWidth(lineThickness);
|
cb.SetLineWidth(lineThickness);
|
||||||
cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left - llxOffset, (Height - lineThickness) * MyPageHelper.YMultiplier);
|
cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier);
|
||||||
}
|
}
|
||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
if (textLayer != null) cb.EndLayer();
|
if (textLayer != null) cb.EndLayer();
|
||||||
|
@ -168,7 +168,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
myparagraph.Alignment = MessageAlignment;
|
myparagraph.Alignment = MessageAlignment;
|
||||||
myparagraph.Leading = iFont.Size;
|
myparagraph.Leading = iFont.Size;
|
||||||
float w = vlnPrintObject.GetTableWidth(cb, myparagraph);
|
float w = vlnPrintObject.GetTableWidth(cb, myparagraph, MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth);
|
||||||
float h = vlnPrintObject.GetParagraphHeight(cb, myparagraph, w);
|
float h = vlnPrintObject.GetParagraphHeight(cb, myparagraph, w);
|
||||||
cb.SetColorFill(changeBarColor);
|
cb.SetColorFill(changeBarColor);
|
||||||
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yBottom + h - Rtf2Pdf.Offset.Y + 2.7F, w, h, "", yBottomMargin);
|
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yBottom + h - Rtf2Pdf.Offset.Y + 2.7F, w, h, "", yBottomMargin);
|
||||||
|
@ -12,7 +12,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
public float HeaderWidth
|
public float HeaderWidth
|
||||||
{
|
{
|
||||||
get { return _WidthAdjust + (_CharsToTwips * Text.Length); }
|
get { return _WidthAdjust + (MyFont.CharsToTwips * Text.Length); }
|
||||||
}
|
}
|
||||||
public vlnHeader(vlnParagraph myParent, PdfContentByte cb, string origStr, string cleanStr, float xoffset, float yoffset, VE_Font vFont)
|
public vlnHeader(vlnParagraph myParent, PdfContentByte cb, string origStr, string cleanStr, float xoffset, float yoffset, VE_Font vFont)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,10 @@ namespace Volian.Print.Library
|
|||||||
System.Drawing.Color push = PrintOverride.SvgColor;
|
System.Drawing.Color push = PrintOverride.SvgColor;
|
||||||
PrintOverride.SvgColor = PrintOverride.TextColor == System.Drawing.Color.Empty ? System.Drawing.Color.Black : PrintOverride.TextColor;
|
PrintOverride.SvgColor = PrintOverride.TextColor == System.Drawing.Color.Empty ? System.Drawing.Color.Black : PrintOverride.TextColor;
|
||||||
if (MyPageHelper != null && MyPageHelper.MySvg != null)
|
if (MyPageHelper != null && MyPageHelper.MySvg != null)
|
||||||
MyPageHelper.MySvg.DrawMacro(MacroDef, XOffset, yLocation, cb);
|
{
|
||||||
|
// PageList items are located with respect to the left margin, macros are not.
|
||||||
|
MyPageHelper.MySvg.DrawMacro(MacroDef, XOffset - MyPageHelper.MySvg.LeftMargin, yLocation, cb);
|
||||||
|
}
|
||||||
PrintOverride.SvgColor = push;
|
PrintOverride.SvgColor = push;
|
||||||
if (textLayer != null) cb.EndLayer();
|
if (textLayer != null) cb.EndLayer();
|
||||||
return yPageStart;
|
return yPageStart;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user