예제 #1
0
        public PdfPCell AddCell(CellRowSettings cellRowSettings, Image image)
        {
            PdfPCell cell = CellSettings(cellRowSettings, image);

            SetSpanAndCellHeight(cell, cellRowSettings);

            return(cell);
        }
예제 #2
0
        public PdfPCell AddTextForCellRow(CellRowSettings cellRowSettings, string text)
        {
            PdfPCell cell = CellSettings(cellRowSettings, text, new Font(Bftimes, 10, Font.NORMAL, BaseColor.BLACK));

            SetSpanAndCellHeight(cell, cellRowSettings);

            return(cell);
        }
예제 #3
0
        public PdfPCell AddCellWithMultipleContent(CellRowSettings cellRowSettings, string subText = "")
        {
            PdfPCell cell = new PdfPCell();

            SetSpanAndCellHeight(cell, cellRowSettings);

            AddCellElement(cell, cellRowSettings, subText);

            return(cell);
        }
예제 #4
0
        public PdfPCell AddCell(CellRowSettings cellRowSettings, string text, BaseColor cellColored, int fontsize = 10)
        {
            PdfPCell cell = CellSettings(cellRowSettings, text, new Font(Bftimes, fontsize, Font.NORMAL, BaseColor.BLACK));

            SetSpanAndCellHeight(cell, cellRowSettings);

            cell.BackgroundColor = cellColored;

            return(cell);
        }
예제 #5
0
        public PdfPCell AddCell(CellRowSettings cellRowSettings, Phrase phrase, BaseColor cellColored)
        {
            PdfPCell cell = CellSettings(cellRowSettings, phrase);

            SetSpanAndCellHeight(cell, cellRowSettings);

            cell.BackgroundColor = cellColored;

            return(cell);
        }
예제 #6
0
        public void AddCellElement(PdfPCell cell, CellRowSettings cellRowSettings, string text)
        {
            Paragraph paragraph = new Paragraph(CellContence(text, new Font(Bftimes, 10, Font.NORMAL, BaseColor.BLACK)))
            {
                Alignment = cellRowSettings.HorizontalAlign
            };

            cell.AddElement(paragraph);
            cell.Border = CellBorder;
        }
예제 #7
0
        public PdfPCell CellSettings(CellRowSettings cellRowSettings, string text, Font font)
        {
            PdfPCell cell = new PdfPCell(CellContence(text, font))
            {
                Border = CellBorder,
                HorizontalAlignment = cellRowSettings.HorizontalAlign,
                VerticalAlignment   = cellRowSettings.VerticalAlign
            };

            return(cell);
        }
예제 #8
0
        public PdfPCell CellSettings(CellRowSettings cellRowSettings, Phrase phrase)
        {
            PdfPCell cell = new PdfPCell(phrase)
            {
                Border = CellBorder,
                HorizontalAlignment = cellRowSettings.HorizontalAlign,
                VerticalAlignment   = cellRowSettings.VerticalAlign
            };

            return(cell);
        }
예제 #9
0
        public PdfPCell AddCellWithMultipleContent(CellRowSettings cellRowSettings, Image image)
        {
            PdfPCell cell = new PdfPCell();

            SetSpanAndCellHeight(cell, cellRowSettings);

            cell.AddElement(image);
            cell.Border = CellBorder;

            return(cell);
        }
예제 #10
0
        public PdfPCell AddCellWithMultipleContent(CellRowSettings cellRowSettings, string subText,
                                                   List <string> subtextList)
        {
            PdfPCell cell = new PdfPCell();

            SetSpanAndCellHeight(cell, cellRowSettings);

            foreach (var text in subtextList)
            {
                AddCellElement(cell, cellRowSettings, text);
            }

            return(cell);
        }
예제 #11
0
        public void SetSpanAndCellHeight(PdfPCell cell, CellRowSettings cellRowSettings)
        {
            if (cellRowSettings.Rowspan != 0)
            {
                cell.Rowspan = cellRowSettings.Rowspan;
            }

            if (cellRowSettings.Colspan != 0)
            {
                cell.Colspan = cellRowSettings.Colspan;
            }

            if (cellRowSettings.CellHeight != 0)
            {
                cell.FixedHeight = cellRowSettings.CellHeight;
            }
        }