收录日期:2019/12/11 02:50:41 时间:2010-10-28 14:27:50 标签:c#,itextsharp
I would like to add an array of PDFPCells to a PDFPRow, then add the PDFPRow to a PDFPTable, but I can't seem to find a method within PDFPTable for this.
There is however a PDFPTable.AddCell
Any ideas?
Check out the PdfPTable
's Rows.Add()
method which takes a PdfPRow, which you can construct using an array of PdfPCells
.
Example:
// ...
PdfPTable table = new PdfPTable(5);
PdfPCell[] cells = new PdfPCell[] { new PdfPCell(GetCell("c1")),
new PdfPCell(GetCell("c2")),
new PdfPCell(GetCell("c3")),
new PdfPCell(GetCell("c4")),
new PdfPCell(GetCell("c5"))};
PdfPRow row = new PdfPRow(cells);
table.Rows.Add(row);
// ...
Where the method GetCell()
returns a PdfPCell
.
iTextSharp - How to add a PDFPRow to a PDFPTable?
Add a column to PdfPTable, iTextSharp
PdfPTable as a header in iTextSharp
iTextSharp Conversion from Table to pdfPTable
itextsharp using pdfptable as a 2x2 matrix
How to add a blank page to a pdf using iTextSharp?
How to resize a pdf using iTextSharp
How to add a form field to an existing pdf with itextsharp?
itextsharp: how do i add a new page and write to it?
itextsharp: default pdfptable filling
How to write a table with iTextSharp [closed]
How to remove a column from an iTextSharp table
How to generate a PDF file preview using iTextSharp
itextsharp: solution on how to display a report
iTextSharp - how to open/read/extract a file attachment?
Can you set a background imaged to a PdfPTable when using iText
How to Add image in pdf using C# and iTextSharp?
iTextSharp add pre-existing PDF as a layer to another PDF