WordDocumentToImage

Converts a page with *.doc or *.docx file to a page or pages in TIFF format.

Member of namespace

Convert

Syntax

bool WordDocumentToImage ()

Parameters

None.

Returns

True if the file is successfully converted to a TIFF document.

False if the current page is not a Word Document or if there is a failure in the conversion.

If the number of input files/pages exceeds the maximum allowed or if there is a failure in the conversion, the batch is set to abort.

Level

Page or Document level.

If called on a page level object, then each new single page TIF file created from the source Word document will be associated with a new DCO page object that is at the same level as the parent DCO page from which the page was created.

If called on a document level object, then each new single page TIF file will be associated with a new DCO page object that is a child page of the parent document object. For example, if the file is associated with a page object, then the DCO structure will be created like this example:
˂page "Other"˃ TM000001.doc (source page object)
˂page "Other"˃ TM000002.tif (new page object, page 1 of TM000001.doc)
˂page "Other"˃ TM000003.tif (new page object, page 2 of TM000001.doc)
˂page "Other"˃ TM000004.tif (new page object, page 3 of TM000001.doc)
˂page "Other"˃ TM000005.tif (new page object, page 4 of TM000001.doc)
If the file is associated with a document object, then the DCO structure would be created like this example:
˂Document "Invoice"˃ TM000001.tif (source document object)
- ˂page "Other"˃ TM000002.tif (new page object, page 1 of TM000001.doc)
- ˂page "Other"˃ TM000003.tif (new page object, page 2 of TM000001.doc)
- ˂page "Other"˃ TM000004.tif (new page object, page 3 of TM000001.doc)
- ˂page "Other"˃ TM000005.tif (new page object, page 4 of TM000001.doc)

Details

If the current page is a Word Document, the file is converted to multiple TIFF files, one TIFF file for each page within the Document, based on the settings of the other Word actions that configure the conversion settings.

Each new TIFF also has a new page created within the application environment which can be processed by subsequent rules. The original file name from which the page was extracted is stored in the ParentImage variable, for possible future reference in your application. If the configured output image format and compression only supports black and white, such as CCITT4, colored text is exported as black.

Example:
WordPrintQuality(200)
WordTiffCompression("CCITT4")
WordDocumentToImage()

This example configures the DPI, compression and blank page handling for the Word documents to TIF conversion. Then the WordDocumentToImage action converts the file associated with the current DCO object to multiple TIF images, one image for each page. New DCO page objects are created for each page and subsequent rules can be run on these pages to perform other tasks such as fingerprinting, classification, recognition and export.