use Table in itextsharp C#
iTextSharp.text.Document doc = new iTextSharp.text.Document( PageSize.A4, 6, 72, 20, 16);
doc.Open();
PdfWriter docWriter = PdfWriter.GetInstance(doc, new FileStream(PdfName, FileMode.Create));
docWriter.StrictImageSequence = true;
PdfPTable table = new PdfPTable(1);
table.TotalWidth = 550f;
table.LockedWidth = true;
for(n records) {
PdfPCell cell = new PdfPCell(new Phrase(""));
cell.AddElement(pdfImage);
cell.BorderColor = BaseColor.WHITE;
table.AddCell(cell);
}
doc.Add(table);
doc.Close();
iTextSharp.text.Document doc = new iTextSharp.text.Document(
doc.Open();
PdfWriter docWriter = PdfWriter.GetInstance(doc, new FileStream(PdfName, FileMode.Create));
docWriter.StrictImageSequence = true;
PdfPTable table = new PdfPTable(1);
table.TotalWidth = 550f;
table.LockedWidth = true;
for(n records) {
PdfPCell cell = new PdfPCell(new Phrase(""));
cell.AddElement(pdfImage);
cell.BorderColor = BaseColor.WHITE;
table.AddCell(cell);
}
doc.Add(table);
doc.Close();
0 comments:
Post a Comment