英文:
unable to generate report in iText core java
问题
我尝试使用 iText5 和 iText7 生成报告,但是遇到了同样的问题:
以下是代码:
try{
Document doc = new Document();
PdfWriter.getInstance(doc, new FileOutputStrem("Repor.pdf"));
doc.open();
}catch(Exception e){
JOptionPane.showMessageDialog(this, e);
}
在这一行:
Document doc = new Document();
为什么它要求我生成抽象方法?
而且在以下代码中没有 .open();
方法:
doc.open();
英文:
I tried to use iText5 and iText7 to generate report but I got the same problem:
here is the code:
try{
Document doc = new Document();
PdfWriter.getInstance(doc, new FileOutputStrem("Repor.pdf"));
doc.open();
}catch(Exception e){
JOptionPane.showMessageDialog(this, e);
}
in line:
Document doc = new Document();
why it ask me to generate abstract methods?
also there is no method .open();
in:
doc.open();
专注分享java语言的经验与见解,让所有开发者获益!
评论