You have to call Document's "close()" before "ViewPdf()". Just about all of the PDF is written as a result of "close()".
--Mark Storer Senior Software Engineer Cardiff Software #include <disclaimer> typedef std::Disclaimer<Cardiff> DisCard; > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of HINDI > TLC > Sent: Friday, May 19, 2006 1:16 AM > To: [EMAIL PROTECTED] > Cc: [email protected] > Subject: [iText-questions] Cannot open pdf. > > > Hi > > My application gives me an error when opening the pdf. > Acrobat Reader says > the file is damaged and cannot be open. > > My code is attached. > >From: bruno <[EMAIL PROTECTED]> > >To: HINDI TLC <[EMAIL PROTECTED]> > >CC: [email protected] > >Subject: Re: [iText-questions] Re: Table Font > >Date: Wed, 17 May 2006 15:51:53 +0200 > > > >HINDI TLC wrote: > > > >>Thx Again Bruno.. Works fine now... > >>One more question.. > >>My app creates a physical file. How do get to create the > file in memory > >>and display it in my browser.. > > > >Create the file in memory by using a ByteArrayOutputStream > >instead of a FileOutputStream. > > > >>When I close my browser, my file must no longer exist. It > must be flushed. > > > >When the ByteArrayOutputStream goes 'out of scope', > >it will be garbage collected. > >Read http://itextdocs.lowagie.com/tutorial/general/webapp/ > >for more information. > >br, > >Bruno > > _________________________________________________________________ > Discover the magic of RSS feeds at MSN South Africa! http://za.msn.com/ ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
