2014年3月11日 星期二

itext-no-underline itext-table-setting

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);

沒有留言:

張貼留言