Things don't work that way. You open the OutputStream, it must be you to open it because there are many ways of opening an OutputStream, and then it's delivered to the application (now the application has full control of it) that closes it when finished with a Document.close(). This is the normal and expected situation. It's very unusual to append anything to a PDF and if needed should be dealt elsewhere. Notice that if you use a OutputStreamWriter it constructs with an OutputStream and close() closes the underlying stream. Just my opinion.
Best Regards, Paulo Soares > -----Original Message----- > From: Erwin Achermann [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 16:49 > To: iText ML (E-Mail) > Subject: RE: [iText-questions] doc.close() closing OutputStream > > The rule is actually very simple: > if the user opened the stream and passed it to the library, then its the > _users_ responsibility to close that stream, and analogously, if the > library opened the stream i would expect it to close it as well. Any > unbalance open-close-stream calls disturb my feelings ;) > > Cheers > Erwin > > > -----Original Message----- > > From: Bruno Lowagie [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, May 28, 2002 4:20 PM > > To: [EMAIL PROTECTED] > > Subject: RE: [iText-questions] doc.close() closing OutputStream > > > > > > Quoting Roman Novichenok <[EMAIL PROTECTED]>: > > > > > Thought it would be useful to have the option of not > > closing the stream > > > within iText library. > > > > In some cases, it would be useful. You are right about that. > > You were also right that changing the original method is not > > a good solution: it would break the functionality for all other > > iText users and applications. > > > > Your question to add a new method was justified, but since there > > is a simple way to solve the problem outside the library, adding > > a new method is no priority. For the moment I am working on other > > projects, so I leave iText development to Paulo and some other > > developers for a while. > > > > I am saving all kind of mails and remarks though, and I will > > take them into account once I decide to take the iText work up > > again (but I really need to do other projects now in order to > > learn about new tools, technologies, programming standards,...). > > > > Bruno > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > iText-questions mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
