![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Itext
文章平均质量分 79
塞北的荒烟
这个作者很懒,什么都没留下…
展开
-
Itext设置页眉页脚、表头划线、水印、条形码、二维码
先上图看效果上代码主要流程: public static void main(String[] args) throws Exception { //1、建立Document对象的实例。 Document document = createDocumentByRectangle(); //2、建立一个书写器(Writer)与document对象关联,通过书写器(Writer)可以将文档写入到磁盘中。 PdfWriter writer = PdfW原创 2020-05-31 18:51:57 · 4627 阅读 · 2 评论 -
Itext设置单元格内容垂直居中
先看效果图再上代码 cell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);//水平居中 cell.setUseAscender(true);//垂直居中 cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);//垂直居中原创 2020-05-30 21:53:09 · 2825 阅读 · 0 评论