Title: Bug found in iTextDOTNet

Hi,

First of all I want to tell you that I like iTextDOTNet very much, it is a very usefull program.
I've just updated my version to your latest iTextDOTNet version 1.1.2-1. After reading some documentation I saw that the RTFWriter I use to create RTF documents is obsolete and is replaced by RTFWriter 2. Now comes the problem.

If I creates an RTF document containing an image(retrieved from a file) with the RTFWriter nothing goes wrong, but if I do the same with the RTFWriter2 something went wrong. Thus I create an RTF document with an image which I retrieve from a file. After the image is added to the document I wants to remove the image, using RTFWriter, this is no problem, but with the new RTFWriter2, the process doesn't release a lock(?) on the used image. Below is the code I use:

        Dim tmpFile As String = IO.Path.GetTempFileName
        If Not (tmpFile = "") Or imageOfModel Is Nothing Then
            imageOfModel.Save(tmpFile, Drawing.Imaging.ImageFormat.Jpeg)

            Dim img As Image = Image.getInstance(tmpFile)

            Me._document.add(img)
            Me._document.add(New Paragraph)

            If IO.File.Exists(tmpFile) Then
                IO.File.Delete(tmpFile)         <-- this goes wrong using RTFWriter2, but not when using RTFWriter
            End If
        End If

Kind regards,
Maarten Leurs
The Netherlands

Maarten Leurs Msc.
Deloitte Consultancy
Â
Main:   +31 (0) 20 454 75 00
Fax:    +31 (0) 20 454 75 55
Mobile: +31 (0) 64 895 78 30
[EMAIL PROTECTED]
www.deloitte.nl
Â
Deloitte
Laan van Kronenburg 2, Amstelveen
P.O. Box 300, 1180 AH, Amstelveen
The Netherlands


--------------------------------------------------------------------------------
This e-mail message and its attachments are subject to the disclaimer published at the following website of Deloitte :
http://www.deloitte.com/nl/disclaimer

Reply via email to