Office Document Imaging (MODI) - File Locked afterwards

J

JimZ

I use MODI in a vb.net application in order to obtain the OCR's result on a
given TIFF file. Everything is OK except that after my function I got a lock
on my TIFF file that I can't move or delete it.

Please help.

Private Sub ReadOCR(ByVal TIFF As String)
Dim doc As New MODI.Document

doc.Create(TIFF)
doc.OCR()

Dim buffer As StreamWriter = File.CreateText("Result.txt")
Dim img As MODI.Image
For i As Integer = 0 To doc.Images.Count - 1
img = doc.Images(i)
Buffer.WriteLine(img.Layout.Text())
Next
buffer.Flush()
buffer.Close()

doc.Save()
doc.Close()
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top