Skip to main content
Kofax

Do Not Perform OCR on Certain Pages

17505

QAID # 17505 Published

Question / Problem:

Do Not Perform OCR on Certain Pages

Answer / Solution:

Often, OCR need not be performed for all pages. This is the case when data has been found on a first page, or a page is marked as an attachment by patchcode or other means.

The locators allow for restricting the search region (and hence the automatically performed OCR) only for the first, middle and last pages, respectively. To inhibit OCR on an arbitrary page, you need to write a short piece of script in the BeforeProcessXDoc event, which is the first event being fired before anything else is done with the Document.

Insert the script code shown below. This script will prevent the server from performing OCR on all pages except the first one. Without OCR, locators will not extract anything on these pages.

Private Sub Document_BeforeProcessXDoc(pXDoc As CASCADELib.CscXDocument)
Dim index As Long
For index = 1 To pXDoc.CDoc.Pages.Count - 1
pXDoc.CDoc.Pages(index).SuppressOCR = True
Next index
End Sub

Applies to:

Product Version Category
AXPRO 4.0 Server
AXPRO 4.5 Server
AXPRO 5.0 Server
AXPRO 5.5 Server
AXPRO 5.5 Server
  • Was this article helpful?