paolo ghiringhelli wrote: > Hi, > my class creates a document and sets header and footer; if the methods that > write the content of the document fail, when I close the document, I get the > error: > ExceptionConverter: java.io.IOException: The document has no pages > > and a file.pdf with 0 length is created.
That's a typical error when nothing is added to the document. Maybe an exception is thrown (and ignored) in step 4 and maybe you are executing step 5 (document.close()) anyway (in spite of the exception in step 4). > When I try to delete this file or to open with Acrobat Reader, without leave > the application (it's a stand alone application), I get the message: "the > file is already open by another application". How are you executing the Java class? For instance, when I use Eclipse, an I execute an example with an error, sometimes a dialog is opened saying something like "An error has occured". In that case, the resources that are used (for instance the PDF file I'm creating) isn't released until I click "OK" in that dialog box. (Unfortunately, that dialog box is sometimes shown under other windows, so I don't always realize right away that there's a problem.) I think you're experiencing a similar problem, but I don't know for sure. This is the type of problems that is best solved if you ask somebody to stand next to you when you reproduce all your consecutive actions. It's hard to solve these 'errors' remotely. br, Bruno ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
