fpFilterConfig()
This function provides a way to enable and configure various options prior to document filtering, such as providing a password for a file, or enabling hidden text extraction.
Syntax
BOOL pascal fpFilterConfig( void *pContext, int nType, int nValue, void *pData );
Arguments
pContext
|
A pointer returned from fpInit() or fpInitWithLicenseData(). |
nType
|
The configuration flag. This is a symbolic constant defined in kvtypes.h . The available options are described in the Filter Configuration Flags table. |
nValue
|
The integer value defined for the flags above. |
pData
|
The data for the configuration flag. |
Returns
- If the call is successful, the return value is
TRUE
. - If the call is unsuccessful, the return value is
FALSE
.
Discussion
- You must call this function after the call to fpInit() or fpInitWithLicenseData() and before the call to fpFilterStream() or fpFilterFile().
- Although
fpFilterConfig()
does not run out of process, any configuration flags that are set throughfpFilterConfig()
are passed to the out-of-process session. - The configuration flags are described in the following table.
Flag | Description |
---|---|
KVFLT_SETOOPSRCFILE
|
If you set this flag to
|
KVFLT_SETTEMPDIRECTORY
|
This flag enables you to specify the directory where temporary files created during filtering processes are stored.
|
KVFLT_SETXMLCONFIGINFO
|
This flag enables you to define which elements and attributes are extracted from XML documents with a specified format ID or root element. You can use this option to override the default settings for the supported XML formats (see Filter XML Files), or to define settings for custom XML document types. The settings are defined in the KVXConfigInfo structure. To set custom settings for more than one document type, call the You can also modify element extraction settings by using the
|
KVFLT_SETSRCPASSWORD
|
This flag enables you to define a password used to open a password-protected file for filtering. See Filter Password Protected Files.
|
KVFLT_LOGICALPDF
|
This flag extracts paragraphs from a PDF file in the order in which they appear on the page (logical reading order). The
|
KVFLT_INCLREVISIONMARK
|
If you set this flag to To reset the flag and exclude deleted text from the filtered output, set the flag to
|
KVFLT_NOEMBEDDEDOBJECT
|
If you set this flag to
|
KVFLT_SHOWHIDDENTEXT
|
If you set this flag to
|
KVFLT_NOCOMMENTS
|
If you set this flag to
|
KVFLT_SHOWDATEFIELDCODE
|
If you set this flag to
|
KVFLT_SKIPEMBEDDEDFONT
|
If you set this flag to
|
KVFLT_SHOWFILENAMEFIELDCODE
|
If you set this flag to
|
KVFLT_KEEPSOFTHYPHEN
|
If you set this flag to
|
KVFLT_SetConfigurableArguments
|
This is used to configure hidden information for Microsoft Excel files. See Hidden Data in Microsoft Excel Documents. If you set this flag to
|
KVFLT_EXPORTALLMETADATA
|
If you set this flag to
|
KVFLT_EXPORTTAGGEDCONTENT
|
If you set this flag to
|
KVFLT_FILTERLOGICALORDER
|
If you set this flag to
|
KVFLT_SETOUTPUTCHARSET
|
This flag enables the output character set to be changed.
|
KVFLT_EXTRACTIMAGES
|
If you set this flag to
|
KVFLT_STANDARDIZECELLFORMATS
|
If you set this flag to
|
KVFLT_TABLEDETECTION
|
If you set this flag to
|
KVFLT_TABDELIMITED
|
If you set this flag to
|
KVFLT_OUTPUTTABLEDELIMITERS
|
If you set this flag to Values are |
KVFLT_NOPHONETICGUIDES
|
If you set this flag to
|
KVFLT_SOURCECODEDETECTION
|
If you enable this option, KeyView attempts to identify the programming language of any source code files that it finds. The
|
KVFLT_CHARSETDETECTION
|
KeyView attempts to detect the character set of an input file. Some character sets (including ANSI, UTF-8, and UTF-16) can be detected by core KeyView functionality but others can only be detected if your license includes advanced character set detection. If your license includes advanced character set detection, it is enabled by default. However, it can increase the time required to filter some documents. To disable advanced character set detection, set this flag to KeyView cannot perform character set conversion unless it detects the character set of the source file, or you call fpSetSrcCharSet(). For more information see Convert Character Sets. |
KVFLT_OCR
|
KeyView performs Optical Character Recognition (OCR) on raster image files, to attempt to filter text that might be visible in the image. OCR is available only on certain platforms (see Optical Character Recognition in the platform differences section). If your license includes OCR, it is enabled by default. To disable OCR set KeyView can perform OCR on a wide range of documents. If you know in advance what you will be processing (for example, if you know that the text in all of your documents is in English) you can specify OCR options to improve performance. To do this, set |
KVFLT_SETOOPUSERWIN
|
You can use this flag to run the out-of-process server (KVOOP) as a specific user, so that you can run KVOOP with different privileges to your main application. See Run KeyView with Reduced Privileges. This flag can be used only on Windows, see To enable this option, set To disable this option, set |
KVFLT_SETOOPUSERUNIX
|
You can use this flag to run the out-of-process server (KVOOP) with a specific user and group ID, so that you can run KVOOP with different privileges to your main application. See Run KeyView with Reduced Privileges. This flag can be used only on non-Windows platforms, see
|
KVFLT_FILTERPIPESTREAMING
|
If you set this flag to This change does not take effect until the next time Values are |
KVFLT_EXTRACTPIPESTREAMING
|
If you set this flag to This change does not take effect until the next time Values are |
KVFLT_UNEXPECTEDZIPDETECTION
|
If you set this flag to Values are |
Examples
-
To specify a password to open a password-protected file for filtering:
(*fpFilterConfig)(pKVFilter, KVFLT_SETSRCPASSWORD, TRUE,
password
);where
password
is a null-terminated string of 255 or fewer characters. -
To extract hidden text from Microsoft Word, Excel, or PowerPoint files:
(*fpFilterConfig)(pKVFilter, KVFLT_SHOWHIDDENTEXT, TRUE, NULL);
-
To extract all custom metadata fields from PDF documents:
(*fpFilterConfig)(pKVFilter, KVFLT_EXPORTALLMETADATA, TRUE, NULL);