Hello all,

I am using itext-1.3.1.jar for generating PDF reports. I have a problem
while trying to display footers.

My code is as below:


Document doc = new Document(PageSize.A4, leftMargin, rightMargin, topMargin,
bottomMargin);

try {

                doc.addAuthor("XYZ");

                doc.addSubject("My Subject");

                doc.addCreationDate();



Table footerTable = new Table(2);

                //footer.setBorder(0);

                //footer.setDefaultCellBorder(0);

                footerTable.addCell(new Phrase("XYZ Limited ", new
RtfFont("Helvetica", footerStaticFontSize)));

footerTable.addCell(new Phrase("An XYZ initiative", new RtfFont("Helvetica",
footerStaticFontSize)));



//Create the RtfHeaderFooter and set it as the footer to use

                doc.setFooter(new RtfHeaderFooter(footerTable));

doc.open();



Paragraph paragraph = new Paragraph(dateFormat.format(date), new
RtfFont("Helvetica", dateFontSize));

                paragraph = new Paragraph("My Title ", new
RtfFont("Helvetica", titleFontSize, RtfFont.BOLD));

                paragraph.setAlignment(Paragraph.ALIGN_CENTER);

                doc.add(paragraph);



                paragraph = new Paragraph("\nREPORT ON EMPLOYEES", new
RtfFont("Helvetica", headingFontSize, RtfFont.BOLD));

                paragraph.setAlignment(Paragraph.ALIGN_CENTER);

                doc.add(paragraph);

}

catch(Exception e){

                throw new Exception(e);

}

doc.close();



With this code, the PDF footer part is shown as "Rectangle: 0.0x0.0". From
one site, I could understand that somewhere the toString() method is being
called. But could not get a solution to problem. Please help.


Roshni.
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to