Use the file names instead of the streams. Streams are read entirely to memory and are not closed, you'll have to close them yourself.
Paulo On Thu, May 24, 2012 at 12:08 PM, Ahmed OUBAHA <[email protected]> wrote: > hello > I have a problem of IOException " The process can not access the file > because it is used by another process ", I have two pdf files, one for > reading and the other for writing, so I > used two filestream, and a PdfStamper, knowing that I close my PdfStamper > when i finished my treatement > > Dim open As New FileStream("D:\FormA.pdf", FileMode.Open) > Dim create As New FileStream("D:\FormB.pdf", FileMode.create) > Dim reader As PdfReader = New PdfReader(open) > Dim stamper As PdfStamper = New PdfStamper(reader, create) > "---------------- > ----------code" > > open.Close() > stamper.Close() > > cordially > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > iText(R) is a registered trademark of 1T3XT BVBA. > Many questions posted to this list can (and will) be answered with a > reference to the iText book: http://www.itextpdf.com/book/ > Please check the keywords list before you ask for examples: > http://itextpdf.com/themes/keywords.php ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
