【发布时间】:2012-05-30 14:05:24
【问题描述】:
public void createPDF( String path ) {
// Met deze functie wordt er een PDF aangemaakt van de huidige factuur
try {
Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream(path + ".pdf"));
document.open();
document.add(new Paragraph("Factuurid = " + Integer.toString(this.id)));
document.close();
} catch (Exception e) {
System.out.println(e);
}
}///this shows errors
【问题讨论】:
-
如果您没有所需的 JAR,这将显示错误。在我看来您缺少 iText 库,而且您的问题不是很清楚