• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1666
  • Last Modified:

WIA and MODi.MiDocView question

Hello
I hope you can help me!
How can I pass a image (scanned from WIA or from a picturebox control) to MODI.document or MODi.MiDocView?

I just want to add a new scanned image to the MODI.document opened in the MODi.MiDocView.
When I trie t do that it gives the error "IO Error"

Thanks

vb 6, vb.net or c#
0
asimoes
Asked:
asimoes
1 Solution
 
gsalierCommented:
This is code I did from a prior answer.
It may not exactly answer your question but I hope it is close or at least gives you an idea.

This was actually how to parse text from an image using ocr.

Module Module1

    Sub Main()

        Dim docScannedImage As MODI.IDocument = New MODI.DocumentClass
        docScannedImage.Create("your path to an image file")

        Dim docViewer As MODI.IMiDocView = New MODI.MiDocViewClass
        Dim images As MODI.IImages = docScannedImage.Images
        Dim image As MODI.IImage

        Try
            For Each image In images

                image.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH)
                Console.WriteLine(image.Layout.Text)

            Next
        Catch ex As Exception
            Console.WriteLine(ex.ToString())
        End Try

        docScannedImage.Close(False)
        Console.ReadLine()

    End Sub

End Module
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now