Pdf Text split and duplicating : Itext

Pdf Text split and duplicating : Itext,pdf,itext,Pdf,Itext,I'm using iText library for generating PDFs where I have a table that spans across pages. In order to continue my text splits across pages, i'v used setSplitLate as false. In some generated PDFs, last line of page 1 gets repeated in first line of page 2. Is there any property that needs to be set to avoid duplication of lines across pages? e.g. code Document document = new Document(PageSize.A4, 0, 0,0, 45); document.open(); PdfWriter writer; PdfPTable table = new PdfPTable(2); table.setWidt

I'm using iText library for generating PDFs where I have a table that spans across pages. In order to continue my text splits across pages, i'v used setSplitLate as false. In some generated PDFs, last line of page 1 gets repeated in first line of page 2. Is there any property that needs to be set to avoid duplication of lines across pages?

e.g. code

Document document = new Document(PageSize.A4, 0, 0,0, 45);
document.open();
PdfWriter writer;

PdfPTable table = new PdfPTable(2);
table.setWidthPercentage(100);
table.setSplitLate(false);

//added stuff in table 

document.add(table);

adding footer in onEndPage():

PdfPTable footer = new PdfPTable(1);
footer.setTotalWidth(595);

PdfPCell footerCell = new PdfPCell();
footerCell.setPaddingTop(10f);
footerCell.setBorder(Rectangle.NO_BORDER);
footer.addCell(footerCell);
footer.writeSelectedRows(0, -1, 0, document.bottom(), writer.getDirectContent());

#1

Please post your code.

#2

@Himal thanks for ur response added e.g. code

#3

The code you provided created an empty table which is not displayed at all.