PdfOCRCreateFromMultipageTIFFEx Method

See Also     Examples     Applies To

Creates a multipage searchable PDF from a multipage tiff image and performs an OCR recognition. This image can be a read only multipage tiff image or an editable multipage tiff image. The recognized text is written invisibly to the PDF in order to simplify indexing and search.

This function uses the tesseract engine included into the gdocrplug.tesseract.dll library.
For each language of recognition, you have to deploy specific files. See below.

Syntax

object.PdfOCRCreateFromMultipageTIFFEx (nImageID., sFilePath, nDictionary, sDictionaryPath, sCharWhiteList, sTitle, sAuthor, sSubject, sKeywords, sCreator, nPdfEncryption, nPDFRight, sUserpassWord, sOwnerPassword)

The PdfOCRCreateFromMultipageTIFFEx syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
nImageID. Required. Long. GdPicture Image handle. The multipage tiff image to save as PDF.
sFilePath Required. String. The complete PDF file path to save the native GdPicture image.
nDictionary Required. Long. The dictionary to use.
Can be:
0: German. Need deu.DangAmbigs, deu.freq-dawg, deu.inttemp, deu.normproto, deu.pffmtable, deu.unicharset, deu.user-words and deu.word-dawg files.
1: Fraktur. Need 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 files.
2: English. Need eng.DangAmbigs, eng.freq-dawg, eng.inttemp, eng.normproto, eng.pffmtable, eng.unicharset, eng.user-words and eng.word-dawg files.
3: French. Need fra.DangAmbigs, fra.freq-dawg, fra.inttemp, fra.normproto, fra.pffmtable, fra.unicharset, fra.user-words and fra.word-dawg files.
4: Italian. Need ita.DangAmbigs, ita.freq-dawg, ita.inttemp, ita.normproto, ita.pffmtable, ita.unicharset, ita.user-words and ita.word-dawg files.
5: Dutch. Need nld.DangAmbigs, nld.freq-dawg, nld.inttemp, nld.normproto, nld.pffmtable, nld.unicharset, nld.user-words and nld.word-dawg files.
6: Portuguese. Need por.DangAmbigs, por.freq-dawg, por.inttemp, por.normproto, por.pffmtable, por.unicharset, por.user-words and por.word-dawg files.
7: Spanish. Need spa.DangAmbigs, spa.freq-dawg, spa.inttemp, spa.normproto, spa.pffmtable, spa.unicharset, spa.user-words and spa.word-dawg files.
8: Vietnamese. Need vie.DangAmbigs, vie.freq-dawg, vie.inttemp, vie.normproto, vie.pffmtable, vie.unicharset, vie.user-words and vie.word-dawg files.
9: Polish. Need pol.DangAmbigs, pol.freq-dawg, pol.inttemp, pol.normproto, pol.pffmtable, pol.unicharset, pol.user-words and pol.word-dawg files.
sDictionaryPath Required. String. The path into which the engine can find the files specified above.
sCharWhiteList Optional. String. Empty by default. This parameter can be used to specify your own white list of chars. IE:
- If you want to recognize only numeric you can use "0123456789".
- If you want to recognize only uppercase alpha you can use "ABCDEFGHIJKLMNOPQRSTUVWXYZ"....
sTitle Optional. String. Default value is "". The PDF Title.
sAuthor Optional. String. Default value is "". The PDF Author.
sSubject Optional. String. Default value is "". The PDF Subject.
sKeywords Optional. String. Default value is "". The PDF Keywords.
sCreator Optional. String. Default value is "". The PDF Creator.
nPdfEncryption Optional. Long. Default value is PdfEncryptionNone. Specifies if the PDF file must be encrypted.
Can be:
PdfEncryptionNone = 0 -> No encryption
PdfEncryption40BitRC4 = 1 -> 40 Bit RC4 encryption
PdfEncryption128BitRC4 = 2 -> 128Bit RC4 encryption
nPDFRight Optional. Long. Default value is PdfRightUndefined. A value returned by the PdfCreateRights function. Available only if nPdfEncryption is not null.
sUserpassWord Optional. String. Default value is "". The user password for the PDF. Can be an empty string. Available only if nPdfEncryption is not null.
sOwnerPassword Optional. String. Default value is "". The owner password for the PDF. Can be an empty string. Available only if nPdfEncryption is not null.

Returns

String. The recognized text.

Remarks

To be used, this function must be unlocked with the SetLicenseNumberOCRTesseract() function.
Use the GetStat() function to determine if this function succeded.

Category

Save and Close Image





© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.