Hy, I want to know if it's possible to rotate a PdfPTable. I have a template pdf where I need to add a table under a specific element but I can't find a way to achieve this. I tried adding the table to a paragraph but I'm not able to rotate the paragraph. this is my code
PdfPTable table = new PdfPTable(15);
foreach(var row in Rows)
{
PdfPCell[] cells = new PdfPCell[] {
new PdfPCell(new Phrase(row.ID.ToString()))
//***MANY OTHER CELLS***//
};
PdfPRow row = new PdfPRow(cells);
table.Rows.Add(row);
}
table.CompleteRow();
Paragraph paragraph = new Paragraph();
paragraph.Add(table);
PdfImportedPage page = writer.GetImportedPage(reader, 1);
cb.AddTemplate(page, 0,-1f,1f,0,0,reader.GetPageSizeWithRotation(1).Width);
doc.Add(paragraph);
I want to add the table under my template, I could even add the table to the template if this could be helpful. someone has some ideas? thank's
PdfWriterinstance? Wouldn't it be much easier for you to usePdfStamperinstead to add the table to the existing page? Please clarify, as this has a significant impact on any possible answer. - Bruno Lowagie