Posted by a ceTe Software moderator
Hello Ravi,
Yes, you can add table to PDF without any problem using our version 3 DynamicPDF Generator for Java product. You will need to use the Table page element to do this. You can add columns and rows to the table as per your business needs. Please refer to the documentation on Table page element
here. Below is sample code for adding table to PDF using Table page element.
Document document=new Document();
Page page=new Page();
Table table=new Table(0,0,200,400);
Column column1=table.getColumns().add(100);
Column column2=table.getColumns().add(100);
Row row=table.getRows().add();
Cell cell=row.getCellList().add("Text1");
Cell cell1=row.getCellList().add("Text2");
page.getElements().add(table);
document.getPages().add(page);
document.draw("C:/Temp/MyDocument.pdf");
Thanks,
ceTe Software Support Team.