wajhi


Hi,

I have been given following Tasks using MS Document Imaging 11.0 API

  1.        Read TIF perform OCR on it
  2.        Show it in AxMODI.AxMiDocView
  3.    Searching / highlighting text in AxMODI.AxMiDocView using MODI.MiDocSearch class in TIFF file and Highlight search result in the view.

1,2 are Ok but I have not been able to do point 3. Following Is the code I wrote to searching text in the document and but it is not working

Can anyone comment on this

 

Loading File

 

MODI.Document _MODIDocument = new MODI.Document();

_MODIDocument.Create(filename);

axMiDocView1.Document = _MODIDocument;

axMiDocView1.Refresh();

 

Performing OCR

 

_MODIDocument.OCR(_MODIParameters.Language,_MODIParameters.WithAutoRotation,_MODIParameters.WithStraightenImage);

 

Searching Text

 

MODI.MiDocSearch modiSearch = new MODI.MiDocSearchClass();

MODI.IMiSelectableItem odiTextSel = null;

object num=0,word=0,start=0,back=null;

modiSearch.Initialize(_MODIDocument, "a",ref num,ref word,ref start,ref back,false, false, false, false);

modiSearch.Search(null,ref odiTextSel);

axMiDocView1.MoveSelectionToView(odiTextSel);

Thanks,

Wajhi




Re: Searching / Hilighting OCR text in Office Document and Imaging

Doppalapudi


Hi Wajhi,

How can i get the AxMODI to my project Plz help me out

Regards,

Doppalapudi.






Re: Searching / Hilighting OCR text in Office Document and Imaging

Doppalapudi

Hi,

Please tell me how can i add reference to AxMODI

Please give me reply immedialty....very urgent.

Regards,

Doppalapudi.






Re: Searching / Hilighting OCR text in Office Document and Imaging

wajhi

Hi Doppalapudi,

Visual studio gives error when you try to add axMODI viewer control through drag and drop on your form.
There is a work around to that.Following are the steps for using the AxMODI control in window forms

1. You add reference to the AxMODI activeX component to your project by right clicking to Reference in Visual Studio and in COM or Browse TAB and browse to the following DLL "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MDIVWCTL.DLL"
2. In Windows form first create a reference to the AxMODI Control e.g private AxMODI.AxMiDocView axMiDocView1;
3. In "InitializeComponent()" method add the following lines
1. this.axMiDocView1 = new AxMODI.AxMiDocView();
2. ((System.ComponentModel.ISupportInitialize)(this.axMiDocView1)).BeginInit();
3. this.axMiDocView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.axMiDocView1.Enabled = true;
this.axMiDocView1.Location = new System.Drawing.Point(0, 39);
this.axMiDocView1.Name = "axMiDocView1";
this.axMiDocView1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMiDocView1.OcxState")));
this.axMiDocView1.Size = new System.Drawing.Size(946, 348);
4. save and build and close the form
5. Open the forms designer you will have control available for usage in the designer


There are some good articles/Samples on code project just write MODI in the search of Codeproject.com and you will have good MODI .net samples available in the search results


I hope this solves your problem.

Thanks,
Wajhi Ghumman





Re: Searching / Hilighting OCR text in Office Document and Imaging

Doppalapudi

Hi Wajhi,

Thank you for spending your valuable time and giving valuable suggestions.

Regards,

Doppalapudi.





Re: Searching / Hilighting OCR text in Office Document and Imaging

Doppalapudi

Hi Wajhi,

How can i take reference to MODI and AxMODI

If i use "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MDIVWCTL.DLL", i am able to see only MODI in references.

How can i get AxMODI Urgent please..............

Regards,

Doppalapudi.





Re: Searching / Hilighting OCR text in Office Document and Imaging

Doppalapudi

Hi wajhi,

Do u have any idea about, how to connect to a scanner and scan an Image. Is there any Library for this

Please reply me as early as possibe.

Regards,

Doppalapudi.





Re: Searching / Hilighting OCR text in Office Document and Imaging

wajhi

Hi Doppalapudi,

which IDE you are using and version.

Thanks,

Wajhi





Re: Searching / Hilighting OCR text in Office Document and Imaging

Doppalapudi

Hi Wajhi,

Thank you for giving quick responce.

I am using Visual Studio 2005 IDE and .NET Framework 2.0.

Regards,

Doppalapudi.





Re: Searching / Hilighting OCR text in Office Document and Imaging

RajL

Hi Doppalapudi and Wajhi,

Did you ever come to know how to get AxMODI reference Both VS 2003 and 2005 do not add MODI to the toolbox. How do you create an AxMODI reference

Thx and Regards,

- Raj





Re: Searching / Hilighting OCR text in Office Document and Imaging

KoshKosh

Can anyone tell me how I can use a pen and brush on the image. I have a similar situation where I am openeing the TIFF file but, I wish to highlite and circle some of the text using a pen. I am at a loss. All input would be greatly received.

Thanks

koshkosh





Re: Searching / Hilighting OCR text in Office Document and Imaging

dchow

How to add axMODI to the library

Thanks,

dchow





Re: Searching / Hilighting OCR text in Office Document and Imaging

MS ISV Buddy Team

This external article might be of interest... one of their suggestions is to drop the image into OneNote. From there you might be able to use a digital pen to mark up the image.

http://www.mydigitallife.info/2007/05/13/how-to-open-mdi-microsoft-document-imaging-format-with-office-2007/

-brenda (ISV Buddy Team)






Re: Searching / Hilighting OCR text in Office Document and Imaging

MS ISV Buddy Team

This external link might be of some help to you regarding adding axMODI:

http://www.codeproject.com/office/modi.asp

-brenda (ISV Buddy Team)






Re: Searching / Hilighting OCR text in Office Document and Imaging

Prathap

hello friends,

This article regarding Microsoft Office Document Imaging[MODI] was good.in that i need to zoom the image that was displayed in the "AxMODI.axMiDocView", whether it is possible to Zoom-In, Zoom-Out & Rotate the Image diaplay in the "AxMODI.axMiDocView"

Regards

Prathap