diff --git a/PROMS/Volian.Print.Library/Rtf2Pdf.cs b/PROMS/Volian.Print.Library/Rtf2Pdf.cs index 1350cee0..a058f2fa 100644 --- a/PROMS/Volian.Print.Library/Rtf2Pdf.cs +++ b/PROMS/Volian.Print.Library/Rtf2Pdf.cs @@ -124,6 +124,21 @@ namespace Volian.Print.Library if (textLayer != null) cb.EndLayer(); return bottom; } + public static float GridAt(PdfContentByte cb, vlnTable myGrid, 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 right = left + width; + float bottom = top - height; + ColumnText myColumnText = new ColumnText(cb); + myColumnText.SetSimpleColumn(left, top, left + width, yBottomMargin); + if (textLayer != null) cb.BeginLayer(textLayer); + myGrid.ToPdf(myColumnText, left, top); + 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;