After upgrading to itextsharp 5.5.0 i get this error in every procedures. This error doesn't fire with olders versions. Is there something to be changed? Thank you.
in System.IO.__Error.FileNotOpen() in System.IO.FileStream.get_Position() in iTextSharp.text.io.RAFRandomAccessSource.Get(Int64 position, Byte[] bytes, Int32 off, Int32 len) in iTextSharp.text.io.IndependentRandomAccessSource.Get(Int64 position, Byte[] bytes, Int32 off, Int32 len) in iTextSharp.text.pdf.RandomAccessFileOrArray.Read(Byte[] b, Int32 off, Int32 len) in iTextSharp.text.pdf.RandomAccessFileOrArray.ReadFully(Byte[] b, Int32 off, Int32 len) in iTextSharp.text.pdf.RandomAccessFileOrArray.ReadFully(Byte[] b) in iTextSharp.text.pdf.PdfReader.GetStreamBytesRaw(PRStream stream, RandomAccessFileOrArray file) in iTextSharp.text.pdf.PdfReader.GetStreamBytesRaw(PRStream stream) in iTextSharp.text.pdf.PRStream.ToPdf(PdfWriter writer, Stream os) in iTextSharp.text.pdf.PdfIndirectObject.WriteTo(Stream os) in iTextSharp.text.pdf.PdfWriter.PdfBody.Write(PdfIndirectObject indirect, Int32 refNumber, Int32 generation) in iTextSharp.text.pdf.PdfWriter.PdfBody.Add(PdfObject objecta, Int32 refNumber, Int32 generation, Boolean inObjStm) in iTextSharp.text.pdf.PdfWriter.PdfBody.Add(PdfObject objecta, PdfIndirectReference refa, Boolean inObjStm) in iTextSharp.text.pdf.PdfWriter.PdfBody.Add(PdfObject objecta, PdfIndirectReference refa) in iTextSharp.text.pdf.PdfWriter.AddToBody(PdfObject objecta, PdfIndirectReference refa) in iTextSharp.text.pdf.PdfReaderInstance.WriteAllPages() in iTextSharp.text.pdf.PdfWriter.AddSharedObjectsToBody() in iTextSharp.text.pdf.PdfStamperImp.Close(IDictionary`2 moreInfo) in iTextSharp.text.pdf.PdfStamper.Close() the code is this... Dim _reader As New iTextSharp.text.pdf.PdfReader("f:\PDF3D_ACRO.pdf") Dim _Dest As iTextSharp.text.pdf.PdfStamper Try IO.File.Delete("F:\finale.pdf") Catch ex As Exception End Try _Dest = New iTextSharp.text.pdf.PdfStamper(_reader, New System.IO.FileStream("F:\finale.pdf", IO.FileMode.CreateNew), iTextSharp.text.pdf.PdfWriter.VERSION_1_4) _Dest.Writer.SetPdfVersion(New iTextSharp.text.pdf.PdfName(iTextSharp.text.pdf.PdfWriter.VERSION_1_4)) Dim Imgreader As iTextSharp.text.pdf.PdfReader = Nothing Dim page As iTextSharp.text.pdf.PdfImportedPage = Nothing Dim cb As iTextSharp.text.pdf.PdfContentByte = Nothing Dim rotation As Integer = 0 If System.IO.File.Exists("C:\SYGEST\Syman3\SymanSuite3\SMS3_Console\bin\home_tmp\3367.166851_B.pdf") Then Try Imgreader = New iTextSharp.text.pdf.PdfReader("C:\SYGEST\Syman3\SymanSuite3\SMS3_Console\bin\home_tmp\3367.166851_B.pdf") page = _Dest.GetImportedPage(Imgreader, 1) rotation = Imgreader.GetPageRotation(1) cb = _Dest.GetOverContent(1) cb.AddTemplate(page, 1, 0, 0, 1, 0, 0) Imgreader.Close() Imgreader = Nothing page = Nothing cb = Nothing Catch End Try End If _Dest.Writer.SetPdfVersion(New iTextSharp.text.pdf.PdfName(iTextSharp.text.pdf.PdfWriter.VERSION_1_6)) _Dest.FormFlattening = False _Dest.Close() _reader.Close() -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStamper-close-error-canno-t-accesso-to-a-closed-file-tp4659982.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net 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