-2
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 라이브러리가 누락 된 것처럼 보입니다. 귀하의 질문은 명확하지 않습니다. –