Hi, please suggest me.
is it correct way to set column widths to a table? PdfPTable pdfTable1 = new PdfPTable(ta.getColumnCount()); // pdfTable1.setLockedWidth(true); pdfTable1.setWidthPercentage(100); List<Float> widths = new ArrayList<Float>(); for(int i=0; i<ta.getColumnCount();i++) { if(ta.getCellWidth(i, i+1)!=0) { System.out.println("table widths "+ta.getCellWidth(i, i+1)); widths.add(PDFUtil.convertToPoint(ta.getCellWidth(i, i+1))); } } if(widths.size()>0) try { pdfTable1.setWidths( ArrayUtils.toPrimitive(widths.toArray(new Float[0]), 0.0F)); } catch (DocumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } Thanks in advance... -- View this message in context: http://itext-general.2136553.n4.nabble.com/coloumn-widths-are-not-reflecting-tp4660289.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php