Document document = new Document(); PdfWriter pdfWriter = PdfWriter.getInstance(document,new FileOutputStream("D:\\appblog\\PDF\\水印.pdf"));
Document document = new Document(); PdfWriter pdfWriter = PdfWriter.getInstance(document,new FileOutputStream(PDF文件的地址)); //获取PDF的内容字节 PdfContentByt
单元格 单元格的创建 PdfPCell pdfPCell = new PdfPCell(); 在创建单元格的时候,我们一般都会给单元格的构造函数传递参数,这个参数多数是一个含有文本的段落,同时会在这个段落上设置了行间距(在字数太多,单元格的宽度较小情况下会进行换行)例如: Paragraph e
段落 段落的创建 Paragraphelements = new Paragraph("aaa"); 或者 Paragraphelements = new Paragraph("中文", font); 添加到段落中的可以是英文,也可以是中文,但如果是中文的