vpdf_AddPageOCR(hVPDF As Long, dwPageNumber As Integer, hDIB As Long, szLanguage As String, dwFlags As Integer, szOCRDLL As String) As Boolean
Description
The vpdf_AddPageOCR function runs optical character recognition (OCR) on the specified DIB and creates a searchable PDF page. The new page is added before the specified page number. After modifying the pages, the PDF file must be saved with the vpdf_SaveVectorPDFFile or vpdf_SaveVectorPDFToMemory function.
The DIB must have the DPI/resolution set correctly. The resolution of the DIB is a critical factor to produce good OCR results. The recommended resolution for OCR is around 300 DPI.
Parameters
Long |
hVPDF |
Handle to a Vector PDF object. |
Integer |
dwPageNumber |
The 0-based index of the new page. |
Long |
hDIB |
Handle to the DIB image. |
String |
szLanguage |
Three character language codes for the OCR. E.g.: “eng”. If multiple languages are used, the language codes must be separated by the ‘+’ character. E.g.: “eng+deu”. The available languages can be retrieved by the GetOCRLanguages function of the BiOCR.dll. See the language codes in the OCR languages section. |
Integer |
dwFlags |
Reserved for future use, set it to 0. |
String |
szOCRDLL |
Name or full path to the BiOCR.dll. If only the name is provided, the DLL is loaded from the same directory as the BiPDF.dll. |
Return value
TRUE on success, otherwise FALSE.