Problem of data overlapping while moving form Landscape to Portrait.
posted 8 years ago
I am writing a PDF document which has number of datatables (a com.lowagie.text.pdf.PdfPTable)
- Each page of the PDF has an header and footer. - Each data table starts on a new page before which there is a one text line, table-title (a com.lowagie.text.Paragraph) is present. - This data table spans over number of pages. - Depending on the number of data columns the datatable is written either on Landscape or Portrait page.
The problem I am facing is, whenever a data table on Landscape page ends at the very bottom of the page, the next datatable on the Portrait page gets distorted.
The table-title (a Paragraph) along with the header comes down at the center of the Portrait page thus overlaping the datatable.
ALso the header and footer on the Portrait page are cut from the right hand side of the page.
I am using below code to change from Landscape to portrait and vice versa: pdfDocument.setPageSize(PageSize.A4.rotate());
Could somebody help me to solve this problem of overlapping?