ImageGear Professional v18.2 > API Reference Guide > PDF Component API Reference > PDF Component Objects > General Objects > IGPDFDoc Object > IGPDFDoc Methods > CreateWordFinder Method |
Creates a word finder that is used to extract text in the host encoding from a PDF file.
The word finder also extracts text from Form XObjects that are executed in the page contents. For information about Form XObjects, see Section 4.9 in the PDF Reference. |
This method also works for non-Roman (CJK or Chinese-Japanese-Korean) viewers. In this case, words are extracted to the host encoding. Users desiring Unicode output must use CreateWordFinderUCS Method, which does the extraction for Roman or non-Roman text.
The type of WordFinder determines the encoding of the string returned by IGPDFWord.GetString. For instance, if CreateWordFinderUCS Method is used to create the word finder, IGPDFWord.GetString returns only Unicode.
For CJK viewers, words are stored internally using CID encoding. For more information on CIDFonts and related topics, see Section 5.6 in the PDF Reference. For detailed information on CIDFonts, see Technical Note #5092, CID-Keyed Font Technology Overview, and Technical Note #5014, Adobe CMap and CIDFont Files Specification.
CreateWordFinder ( EncInfo As IGIntegerArray, EncVec As
IGStringArray, LigatureTbl As IGStringArray, AlgVersion As
enumIGPDFWordFinderVersion, Flags As enumIGPDFWordFlags) As
IGPDFWordFinder
Name | Description |
---|---|
EncInfo | Array of 256 flags, specifying the type of character at each position in the encoding. Each flag is an OR of the Character Type Codes. If EncInfo is NULL, the platform's default encoding info is used. Use EncInfo and EncInfo together; for every EncInfo use a corresponding EncVec to specify the character at that position in the encoding. |
EncVec | Array of 256 null-terminated strings that are the glyph names in encoding order. See the discussion of character names in Section 5.3 of the PostScript Language Reference Manual, Third Edition. If EncVec is NULL, the platform's default encoding vector is used. Use this parameter with EncInfo. |
LigatureTbl | A null-terminated array of null-terminated strings. Each string is the glyph name of a ligature in the font. When a word contains a ligature, the glyph name of the ligature is substituted for the ligature (for example, ff is substituted for the ff ligature). If ligatureTbl is NULL, a default ligature table is used, containing the following ligatures: fi, ff, fl, ffi, ffl, ch, cl, ct, ll, ss, fs, st, oe, OE. |
AlgVersion | The version of the word-finding algorithm to use. |
Flags | Word-finding options that determine the tables filled when using IGPDFWordFinder.AcquireWordList. Must be an OR of one or more of enumIGPDFWordFlags. |