Hi Sainath,

there a two different ways to create PdfPCells. Text mode and composite 
mode. You've used text mode. There the attributes of the paragraph are 
ignored. With composite mode these attributes are respected and you can 
use the getDefaultCell feature of PDFPTable. 

Have a look at this example:
http://www.1t3xt.info/examples/browse/?page=example&id=97

For further information search the list archives for composite mode or buy 
the iText in Action book. In the book the difference is explained very 
well.

Best regards
Benjamin



Sainath Nutakki <[email protected]> 
06.02.2009 18:51
Bitte antworten an
Post all your questions about iText here 
<[email protected]>


An
[email protected]
Kopie

Thema
[iText-questions] Do not want the borders on a PDFPTable






I need a PDFP table and I do not want to borders on it , the below code 
does not seem to accomplish what i want.
can i anyone help me fix the code.

PdfPTable tablex1=new PdfPTable(2);
tablex1.getDefaultCell().setBorder(Rectangle.NO_BORDER);
tablex1.setSpacingBefore(15f);
tablex1.setTotalWidth(300);
tablex1.setLockedWidth(true);

PdfPCell cell = new PdfPCell(new Paragraph("header with colspan 3"));
cell.setBackgroundColor($hdr2BgColor);
cell.setHorizontalAlignment(Element.ALIGN_RIGHT); 
tablex1.addCell(cell);

PdfPCell cell = new PdfPCell(new Paragraph("header with colspan 3"));
cell.setBackgroundColor($hdr2BgColor);
cell.setHorizontalAlignment(Element.ALIGN_LEFT);
tablex1.addCell(cell);


document.add(tablex1);

thanks in advance,
Sai.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with 
Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code 
to
build responsive, highly engaging applications that combine the power of 
local
resources and data with the reach of the web. Download the Adobe AIR SDK 
and
Ajax docs to start building applications 
today-http://p.sf.net/sfu/adobe-com_______________________________________________
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





____________________________________________________________________

Viessmann IT Service GmbH
Geschäftsführer: Dirk Klöckner, Dr. Harald Dörnbach
Sitz der Gesellschaft: Allendorf (Eder) - Registergericht: 
AG Marburg (Lahn) - HRB 5324 - USt-IdNr.: DE258558424
____________________________________________________________________
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
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

Reply via email to