• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1711
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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