Table in pdf

Table in pdf

Forum member · Jan 3, 2014
Hi , i am ravi. now am developing android application and i'm using ur source for generate pdf. it was very useful. now i need to insert or draw table in pdf. that means i want to show my result in table in pdf.so kindly help me to create table inside pdf asap.

Re: Table in pdf

Support · Jan 3, 2014
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.