document.addTitle(“Title@PDF-Java”);// 标题 document.addAuthor(“Author@umiz”);// 作者 document.addSubject(“Subject@iText pdf sample”);// 主题 document.addKeywords(“Keywords@iTextpdf”);// 关键字 document.addCrea
:设置文档的创建者信息。 setKeywords(String keywords:设置文档的关键字信息(描述内容的关键字,有助于文档的分类和搜索)。 setProducer(String producer:设置文档的生成器信息(生成文档的应用程序的名称)。 setSubject(String subject:设置文档的主题信息(文档所涉及的主题或主要内容的描述)。 setTrapped(PdfName...
注:如果你将例中“document.Add(new Paragraph("Hello World"));”中的字符串“Hello Word”换成中文,如“这是我的第一个PDF文件”,产生的结果一定让你大失所望,因为生成的PDF文件中并没有将中文显示出来,不要担心,在第9章中要专门讲解字体问题,中文显示也就迎刃而解了,如果不能正确显示中文,也就没有必要...
("合同");// 主题 document.addKeywords("合同");// 关键字 document.addCreator("XXXX有限公司");// 谁创建的 document.add(headerTable); PdfDiv sealImageDiv = new PdfDiv(); sealImageDiv.setPosition(PositionType.ABSOLUTE); sealImageDiv.setPaddingLeft(300); sealImageDiv.setPaddingBottom(700); ...
Java PDFBox 写入文本 在以下示例中,我们创建一个 PDF 文档并在其中写入一些文本。 JavaPdfBoxWriteText.java package com.zetcode; import java.io.IOException; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage;
首先打开documet(这个过程就像我们创建一个空的pdf文件,然后打开来创作一样) 然后开始写入数据 设置文档属性 最后关闭 代码语言:javascript 代码运行次数:0 运行 AI代码解释 document.open();document.addTitle("标题");document.addAuthor("每天学Java");document.addSubject("测试报表");document.addKeywords("关键...
addKeywords("iText 生成PDF 纯代码实现 表格 等效果 ");//关键字 //顶部说明 document.add(new Paragraph("报告内容涉及个人隐私,查询者应依法使用、妥善保管。", iTextPDFUtil.getColorFont(BaseColor.RED,19,"宋体"))); document.add( Chunk.NEWLINE ); //报告基础信息说明 document.add(new Paragraph("...
addKeywords("Java, PDF, iText"); document.addAuthor("Lars Vogel"); document.addCreator("Lars Vogel"); } private static void addTitlePage(Document document) throws DocumentException { Paragraph preface = new Paragraph(); // We add one empty line addEmptyLine(preface, 1); // Lets write a...
-g Generates all debugging information, including local variables. By default, only line number and source file information is generated. -g:[lines, vars, source] Generates only the kinds of debugging information specified by the comma-separated list of keywords. Valid keywords are: lines Line ...
Categories and Subject Descriptors D.2.7 [Software Engineering]: Distribution, Maintenance, and Enhancement General Terms Performance Keywords Refactoring, Java, concurrent library, pointer analysis; 1. INTRODUCTION Multithread programming is becoming increasingly important in exploiting the capabilities of ...