Thanks, definitely I don’t want to exploit you :)
In my example I have to print footer in 2 line.
See my code. Footer is displayed with border see attachment. What method I should call to remove border.
Rectangle page = doc.getPageSize();
PdfPTable foot = new PdfPTable(1);
Phrase pp = new Phrase("3900 Reservoir Road, N.W. Washington, DC 20057", new Font(Font.COURIER, 10, Font.ITALIC, Color.BLACK));
foot.addCell(pp);
pp = new Phrase("202-687-6553 202-687-4847 facsimile", new Font(Font.COURIER, 10, Font.ITALIC,Color.BLACK));
foot.addCell(pp);
foot.setTotalWidth(page.width() - doc.leftMargin() - doc.rightMargin());
foot.writeSelectedRows(0, -1, doc.leftMargin(), doc.bottomMargin(),writer.getDirectContent());
foot.setHorizontalAlignment(Element.ALIGN_CENTER);
Also I have to display header as Image. Here is code for that . But here header is height is very much. I want to make it less. So what is avaible for making header image smaller.
Rectangle page =
doc.getPageSize();
PdfPTable head = new
PdfPTable(1);
Image image = Image.getInstance
(contextPath + "\\emailHeader.jpg");
image.scaleAbsolute(100, 100);
head.addCell(image);
head.setTotalWidth(page.width()
- document.leftMargin() - document.rightMargin());
head.writeSelectedRows(0, -1, document.leftMargin(), page.height() -
document.topMargin() +
head.getTotalHeight(),
writer.getDirectContent());
Thanks
Shailesh
-----Original Message-----
From: bruno [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 14, 2006 1:23 PM
To: Shailesh Raj (WT01 - HLS)
Cc: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Replacing placeholder value in PDF
[EMAIL PROTECTED] wrote:
>Thanks...
>Now I want to implement the requirement in same manner. I can create
>XML myself corresponding to PDF template .
>
>
OK.
>In your mail I couldn't understand "Ghent University gives me a PDF
>with the background of the letter", whether this is PDF file like I
>sent in earlier mail?
>
>
Yes and no.
It's almost a blank page with the University Logo on top (like a banner) and some addresses at the bottom (like a footer).
>I gone through SAXmyHandler , SAXiTextHandler javadoc and Events.java
>source but I couldn't understand much how I can use these classes
>SAXmyHandler , SAXiTextHandler etc. for my requirement.
>
>
I don't use those classes for these projects.
>Could you please take some time send me some pseudo code for how to
>generate PDF file if I have PDF template (see attachment) and one XML
>file as you said ( you can give me idea how to create XML template for
>given PDF template)?
>
It's just plain SAX ( = SIMPLE API for XML).
Note that you are crossing a border by asking this.
Please step back a little or I'll give you my standard answer:
do not take advantage of me by trying to let me do your work for free ;-) br, Bruno
emailTextExemptGranted.pdf
Description: emailTextExemptGranted.pdf