版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/forwujinwei/article/details/81915259
在前一篇的基础上写一个helloworld案例
heloworld
public static void main(String[] args ) throws FileNotFoundException{
PdfWriter writer = new PdfWriter("F:\\hellowprld.pdf");
PdfDocument pdf = new PdfDocument(writer);
Document document = new Document(pdf);
document.add(new Paragraph("Hello World!"));
document.close();
}
运行代码到对应目录下找就会发现pdf文件已经创建成功
是不是很简单啊,接下来梳理itext7中各个接口的功能