无法在iText核心Java中生成报告。

huangapple 未分类评论47阅读模式
英文:

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();

huangapple
  • 本文由 发表于 2020年4月10日 00:41:39
  • 转载请务必保留本文链接:https://java.coder-hub.com/61126034.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定