iText error

Hi,when I tried to use iText to create a simple PDF file, the system generated error “No message found for 1.not.found.as.resource” after the command document.add(paragraph).

Obviously, the command documet.close() throws another error: “document has no pages”.

This is the code (inside a onclick event of a button):

try {

var doc:com.itextpdf.text.Document = new com.itextpdf.text.Document(com.itextpdf.text.PageSize.A4);

var writer = com.itextpdf.text.pdf.PdfWriter.getInstance(doc,new java.io.FileOutputStream(“test.pdf”));

doc.open();

var p:com.itextpdf.text.Paragraph = new com.itextpdf.text.Paragraph(“Hello world!”);

doc.add(p); // error

doc.close();

}

catch(e) {

print(e.message);

}

Can you help me?

TIA

Subject: Solved

I have added the variable JavaUserClasses to the notes.ini, as explained in http://www-10.lotus.com/ldd/dominowiki.nsf/dx/javauserclasses, and now all works fine!

Regards, Simone