Hi Bruno,
        Thanks a lot for your help yesterday. Now I am facing another
problem. How to put 10f space after my header in each page. I am using
page events, but if I add one more cell row in my header table the image
in the first cell is getting cut , how to increase that cell size so
that the image does not need to cut to fit the next row.

Code :

        public void onEndPage(PdfWriter writer, Document document) {
                
                Rectangle page = document.getPageSize();
                try {
                        // Creation of the Base Font.
                        bf = BaseFont.createFont(
        
"C:/OS/Fonts/CreditSuisseType-Light.ttf",
                                        BaseFont.IDENTITY_H,
BaseFont.EMBEDDED);
                        
                        PdfPTable head = new PdfPTable(2);
                        //Set the widths of the columns.
                        head.setWidths(new float[] {30f, 80.0f}); 
                        
                        Image jpg =
Image.getInstance("icons/CS_LOGO.jpg");
                        PdfPCell pictureCell = new PdfPCell();
                        pictureCell.setImage(jpg);
                        pictureCell.setMinimumHeight(17f);
        
pictureCell.setVerticalAlignment(Element.ALIGN_BOTTOM);
                        //pictureCell.setBorder(Rectangle.NO_BORDER);
                        head.addCell(pictureCell);
              
                        PdfPCell cellblank = new PdfPCell(new
Phrase(""));
                        cellblank.setMinimumHeight(17f);
                        //cellblank.setBorder(Rectangle.NO_BORDER);
                        head.addCell(cellblank);
                        
                        head.setTotalWidth(page.getWidth() -
document.leftMargin()
                        - document.rightMargin());
                        head.writeSelectedRows(0, -1,
document.leftMargin(),
                                        page.getHeight() -
document.topMargin()
                                        + head.getTotalHeight(),
writer.getDirectContent());


Please help me.
Thanks
Niladri.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bruno Lowagie (iText)
Sent: Thursday, October 25, 2007 1:42 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Border Length Control required.

Bhattacharyya Niladri (KSFJ 311) wrote:
>  
> hi 
>   thanks for telling that..but using events how can i control cell
borders..is there any example available somewhere ?

Yes, in chapter 10 of the book:
http://itext.ugent.be/itext-in-action/
You'll also find some examples in the free online tutorial
(but the book has some better examples).
br,
Bruno

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to