OCR_Init

<< Click to Display Table of Contents >>

Navigation:  OCR Module > High-Level Functions >

OCR_Init


 

PRO SDK Icon OCR_Init

 


 

OCR_Init initializes the library and sets up a new PXODocument in order to run OCR. OCR_LoadW or OCR_LoadA can be used to load PDFs into this function. OCR_Delete must be used to delete objects after they have been used. Please note that all elements are case-sensitive:

 

HRESULT OCR_Init(

PXODocument *Doc,

LPCSTR Key

LPCSTR DevCode,

);

 

Parameters

 

Doc

Pointer to the PXODocument variable that will receive the PDF object.

 

Key

Pointer to the null-terminated string that contains the license key. This parameter may be NULL, in which case the library will operate in evaluation mode. This means that OCR functions can process only the first two pages of input documents.

 

DevCode

Pointer to the null-terminated string that contains the developer code. If this parameter is absent/invalid, then demo labels will be added to all generated pages. Please note that pDevCode is only needed when the older style license keys are used. If a new style of key is being used then the pDevCode parameter should should be NULL or just an empty string. This is because the new style keys include the information necessary for the pDevCode parameter, but we must retain the property as there are still users who have the older style license keys.string that contains the developer code.

 

Return Values

 

If the function succeeds then the return value is OCR_OK (0).

 

If the function fails then the return value is an error code.