This commit is contained in:
@@ -103,6 +103,29 @@ namespace Volian.Print.Library
|
||||
DrawPdfDebug(cb, left, top, left + width, myColumnText.YLine, debugText,yDescent);
|
||||
return myColumnText.YLine;
|
||||
}
|
||||
public static float FigureAt(PdfContentByte cb, iTextSharp.text.Image image, float x, float y, float width, float height, string debugText, float yBottommargin, bool hasBorder)
|
||||
{
|
||||
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
||||
PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer;
|
||||
float left = x + Offset.X;
|
||||
float top = y + Offset.Y;
|
||||
float bottom = top - height;
|
||||
image.ScaleAbsoluteWidth(width);
|
||||
image.ScaleAbsoluteHeight(height);
|
||||
image.SetAbsolutePosition(left, bottom);
|
||||
if (textLayer != null) cb.BeginLayer(textLayer);
|
||||
cb.AddImage(image);
|
||||
if (hasBorder)
|
||||
{
|
||||
iTextSharp.text.Color boxColor = new iTextSharp.text.Color(System.Drawing.Color.Black); // (PrintOverride.OverrideBoxColor(System.Drawing.Color.Black));
|
||||
cb.SetColorStroke(boxColor);
|
||||
cb.SetLineWidth(.85F);
|
||||
cb.Rectangle(left-1.5F, bottom-1.5F, width+3, height+3);
|
||||
cb.Stroke();
|
||||
}
|
||||
if (textLayer != null) cb.EndLayer();
|
||||
return bottom;
|
||||
}
|
||||
private static void DrawPdfDebug(PdfContentByte cb, float left, float top, float right, float bottom, string debugText, float yDescent)
|
||||
{
|
||||
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
||||
|
Reference in New Issue
Block a user