Friday, December 30, 2011

Java pdfwriter and Document

With the use of Java Document class, We can easily create pdf file in a efficient manner.

And also we can use to Lotus notes Java Agent.,

Sample Code for Header and Footer is in below,

If we want to put a logo in all pages, In headerfooter class's objects are helping us...

Image img1=Image.getInstance("C:\\Documents and Settings\\maarga_trainees\\Desktop\\test\\maarga_logo.jpg");
HeaderFooter header= new HeaderFooter(new Phrase(new Chunk((Image) img1,0,0)), false);
HeaderFooter footer = new HeaderFooter(new Phrase("Footer"), new Phrase("."));

Here we have header and footer. And also we can add a new table in header and footer for proper order.

No comments:

Post a Comment