1. éè¿è®¾ç½®è¡¨æ ¼çè¾¹æ¡ï¼å¯ä»¥å®ç°ï¼
public static PdfPCell createCellTL(String value,
int align, Font font,int colspan) { //ä¸å·¦æè¾¹æ¡çè¡¨æ ¼:1.è¡¨æ ¼å
容ï¼2.åä½ï¼3.对é½æ¹å¼ï¼4.横跨åæ°
PdfPCell cell = new PdfPCell();
//cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(align); //水平对é½
cell.setColspan(colspan);
cell.setPhrase(new Phrase(value,textfont)); //è®¾ç½®è¡¨æ ¼ççè¯
cell.setPadding(5.0f); //设置å
é´è·
cell.disableBorderSide(2); //éèä¸å³è¾¹æ¡
cell.disableBorderSide(8);
return cell;
}
温馨提示:答案为网友推荐,仅供参考