i've been trying to create a PDF file using Itext library,
this was my method:
private void printPDF() throws FileNotFoundException, DocumentException, IOException {
OutputStream file = new FileOutputStream(new File("D:\\test.pdf"));
Document document = new Document();
PdfWriter.getInstance(document, file);
document.open();
document.add(new Paragraph("Your name is "+ l1.getText()));
document.add(new Paragraph("****************************"));
document.add(new Paragraph(" "));
document.add(new Paragraph(" "));
document.add(new Paragraph("Your surname is "+ l2.getText()));
document.add(new Paragraph("****************************"));
document.add(new Paragraph(" "));
document.add(new Paragraph(" "));
document.add(new Paragraph("Your Appointment Date is "+ l3.getText()));
document.add(new Paragraph("****************************"));
document.add(new Paragraph(" "));
document.add(new Paragraph(" "));
document.add(new Paragraph(new Date().toString()));
document.close();
file.close();
}
however when i run i got multiple errors related to io; "cannot find symbol import java.io.File;"/ cannot find symbol import java.io.FileNotFoundException;/ cannot find symbol import java.io.FileOutputStream; is there any problem with io in codename one!!??
plz clarify !