Using iText in an applet
Hey Guys,
im using the library iText in my JApplet to create a PDF. In Eclipse everything works properly but when i start the Applet in my Browser (mozilla firefox or ie) it seems that the program cannot write to the pdf File.
I signed my jar file and the file will be created but the size is 0 kb :-(
Does anybody have an idea why the program cant write to the file?
Here is my code.
if (pdfFile !=null){
Document document =new Document();
try{
PdfWriter pdfWriter = PdfWriter.getInstance(document,
new DataOutputStream(new BufferedOutputStream(new FileOutputStream(pdfFile))));
pdfWriter.setViewerPreferences(PdfWriter.PageModeUseThumbs);
document.addAuthor("MyName");
document.addTitle("myTopic");
document.open();
Paragraph intro =new Paragraph("Der Build Prozess", titleFont);
document.add(intro);
}catch (DocumentException de)
{
view.setInfoText(de.getMessage());
}catch (IOException ioe)
{
view.setInfoText(ioe.getMessage());
}
document.close();
}
Thanks for helping me.

