如何在 pdf 文件中添加信头图标?它只打印文本文件中的值。
try{
Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream("Payment.pdf"));
document.open();
document.add(new Paragraph("Payment Information", FontFactory.getFont(FontFactory.COURIER,18, Font.BOLD)));
document.add(new Paragraph(" "));
document.add(new Paragraph("Customer ID: "+value1));
document.add(new Paragraph("Name: "+value2));
document.add(new Paragraph("Date Applied: "+value3));
document.add(new Paragraph("Months: "+value4));
document.add(new Paragraph("Amount: "+value5));
document.add(new Paragraph("Interest: "+value6));
document.add(new Paragraph("Monthly Payment: "+value7));
document.add(new Paragraph("Total: "+value8));
document.close();
JOptionPane.showMessageDialog(null, "Record Saved");
}
catch(Exception e){
JOptionPane.showMessageDialog( null, e);
}