PdfRpt.ColumnsItemsTemplates.ImageFilePathField.RenderingCell C# (CSharp) Method

RenderingCell() public method

Custom cell's content template as a PdfPCell
public RenderingCell ( PdfRpt.Core.Contracts.CellAttributes attributes ) : PdfPCell
attributes PdfRpt.Core.Contracts.CellAttributes
return iTextSharp.text.pdf.PdfPCell
        public PdfPCell RenderingCell(CellAttributes attributes)
        {
            if (attributes.RowData.Value == null) return new PdfPCell();

            var iTextImg = getImage(attributes);
            var pdfCell = new PdfPCell(iTextImg, fit: _fitImages)
            {
                PaddingTop = 2,
                PaddingBottom = 2,
            };

            if (!_fitImages)
            {
                pdfCell.MinimumHeight = iTextImg.Height + 5;
                pdfCell.VerticalAlignment = Element.ALIGN_BOTTOM;
            }

            return pdfCell;
        }