Image Viewer CP ActiveX Control

OCR2SearchableMultipagePDF

 

Convert multi-page TIF/PDF file to Searchable Multipage PDF/A file. It support full page or on zone of the image defined by OCRSetRect method.

Public Function OCR2SearchableMultipagePDF( _
   ByVal strPDFFile  As String, _
   ByVal iDictionaryType As Integer, _
   ByVal strDictionaryPath As String
) As Integer

 

Parameter

strPDFFile
The output PDF file name.

iDictionaryType
0 - English
Need include eng.DangAmbigs, eng.freq-dawg, eng.inttemp, eng.normproto, eng.pffmtable, eng.unicharset, eng.user-words and eng.word-dawg dictionary files in strDictionaryPath Folder.
 
1 - German
Need include deu.DangAmbigs, deu.freq-dawg, deu.inttemp, deu.normproto, deu.pffmtable, deu.unicharset, deu.user-words and deu.word-dawg dictionary files in strDictionaryPath Folder.

2 - Fraktur
Need include deu-f.DangAmbigs, deu-f.freq-dawg, deu-f.inttemp, deu-f.normproto, deu-f.pffmtable, deu-f.unicharset, deu-f.user-words and deu-f.word-dawg dictionary files in strDictionaryPath Folder.

3 - Italian
Need include ita.DangAmbigs, ita.freq-dawg, ita.inttemp, ita.normproto, ita.pffmtable, ita.unicharset, ita.user-words and ita.word-dawg dictionary files in strDictionaryPath Folder.

4 - Dutch
Need include nld.DangAmbigs, nld.freq-dawg, nld.inttemp, nld.normproto, nld.pffmtable, nld.unicharset, nld.user-words and nld.word-dawg dictionary files in strDictionaryPath Folder.

5 - Portuguese
Need include por.DangAmbigs, por.freq-dawg, por.inttemp, por.normproto, por.pffmtable, por.unicharset, por.user-words and por.word-dawg dictionary files in strDictionaryPath Folder.

6 - Spanish
Need include spa.DangAmbigs, spa.freq-dawg, spa.inttemp, spa.normproto, spa.pffmtable, spa.unicharset, spa.user-words and spa.word-dawg dictionary files in strDictionaryPath Folder.

strDictionaryPath
The path of dictionary files. It need same as the ocx folder. e.g. If the ocx file locate on c:\test folder
if the dictionary files locate on c:\test\dictfiles , you need set "dictfiles" in strDictionaryPath parameter.


Return Value

Return 1 - Successful
Return -1 - Cannot start, because it is recognizing. 
Return -2 - General Error.
Return -3 - You must Load the image first. Call FileName property or LoadMultiPage method.
Return -4 - Cannot get the image.

Example

   

Visual Basic Syntax
ImageViewer1.LoadMultiPage "c:\source.tif",0
iResult=ImageViewer1.OCR2SearchableMultipagePDF("c:\searchablepdf.tif", 0,"dictfiles")