Microsoft Office Document Imaging 2003 (MODI) Object Model


Overview

The Microsoft Office Document Imaging 2003 (MODI) Object Model consists of 5 first-level objects:
1. The Document Object (a collection of Image Objects)
2. The Image Object (a single Image of a Document Object)
3. The Layout Object (recognized OCR results of an Image object)
4. The MiDocSearch Object (exposes text search functionality on an image)
5. The MiDocView Object (which is actually the MODI Viewer OCX Control)


The Document Object is actually a collection of images (remember that both the TIFF and MDI image formats are multi-paged image formats). One of the properties within the Document Object is a collection of Image Objects. Each Image Object within the Images Collection represent a single image. After OCR is performed, the results of the OCR is stored in a Layout Object. The Layout Object can be accessed as a property within the Image Object.


Referencing the Object Model in a Microsoft Visual Basic Project

To include the Microsoft Office Document Imaging 2003 (MODI) Object Model into a Microsoft Visual Basic project, use the Project | References menu item and set a reference in the project to the Microsoft Office Document Imaging 11.0 Type Library (mdivwctl.dll).


Reference

The tables below provide reference information regarding the properties, methods and events of the objects within the Microsoft Office Document Imaging 2003 (MODI) Object Model.

 
  The Document Object
  Properties   Description
 BuiltInDocumentProperties An Office DocumentProperties collection
 CustomDocumentProperties An Office DocumentProperties collection
 Dirty TRUE if the document has unsaved changes
 Images The document's collection of Image Objects. Refer to the Image Object description below for more information.
 
  Methods   Description
 Close Closes the document. Unsaved changes will be lost.
 Create Creates a new document
 OCR Performs OCR (on the entire document)
 PrintOut Prints the document to a printer or file
 Save Saves all changes to the document
 SaveAs Saves the document as a new file with options for image format change and compression level change
 
  Events   Description
 OnOCRProgress Occurs periodically during the OCR process. Reports the estimated completion percentage and allows the user to cancel the OCR process.


 
  The Image Object
  Properties   Description
 BitsPerPixel Bits per pixel
 Compression Compression level
 Layout Results of OCR for the image
 Picture The image as an IPictureDisp interface
 PixelHeight Height of the image in pixels
 PixelWidth Width of the image in pixels
 Thumbnail The image as an IPictureDisp interface
 XDPI Pixels per inch (X-axis)
 YDPI Pixels per inch (Y-axis)
 
  Methods   Description
 OCR Performs OCR (on the image only)
 Rotate Rotates the image clockwise (90-degree increments)


 
  The Layout Object
  Layout Object
  Properties   Description
 Language The OCR language setting
 NumChars The number of characters recognized
 NumFonts The number of fonts recognized
 NumWords The number of words recognized
 Text The recognized text
 Words The recognized text as a collection of Word Objects. Refer to the Word Object description below for more information.

  Word Object
  Properties   Description
 Font The font used by the word (represented by an MiFont Object). Refer to the MiFont Object description below for more information.
 FontId The index into the implicit fonts collection
 Id The index into the image's Words collection
 LineId The index into the implicit lines collection
 RecognitionConfidence The OCR recognition confidence factor
 Rects The bounding rectangles that include the word
 RegionId The index into the implicit regions collection
 Text The Word Object's text

  MiFont Object
  Properties   Description
 FaceStyle Face style (e.g. Bold)
 Family Font family (e.g. Times New Roman)
 FontSize Font point size
 SerifStyle Font serif style (e.g. Thin)


 
  The MiDocSearch Object
The MiDocSearch object allows users to search the recognized text within an image. The Initialize method is called to prepare the MiDocSearch object for a subsequent call to the Search method. The Search method returns an IMiSelectableItem object (which exposes a Words collection). 


 
  The MiDocView Object
The MiDocView object represents the MODI Viewer OCX Control that is used to display images.




 


  Developer's Corner
 
Imaging Toolkits
TWAIN
Image Formats
Color Spaces
Auto Recognition
Useful Links
MODI Viewer Control
Overview
Object Model
Viewer OCX Control