# 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 through `fpFilterConfig()` are passed to the out-of-process session.
- The configuration flags are described in the following table.

Filter Configuration Flags

Flag | Description
--- | ---
`KVFLT_SETOOPSRCFILE` | If you set this flag to `TRUE`, the input file name is reported in the out-of-process error log when the file generates an error in stream mode. See Report the File Name in Stream Mode. The default is `FALSE`. `nValue` is `TRUE` or `FALSE`. `pData` is the name of the input file generating errors.
`KVFLT_SETTEMPDIRECTORY` | This flag enables you to specify the directory where temporary files created during filtering processes are stored. `nValue` is set to `0`. `pData` is the path name of the directory where temporary files are stored. This value must be null terminated.
`KVFLT_LOGICALPDF` | This flag extracts paragraphs from a PDF file in the order in which they appear on the page (logical reading order). The `nValue` argument specifies the paragraph direction. See Filter PDF Files. `nValue` is one of the paragraph direction options defined in the LPDF_DIRECTION enumerated type in `kvtypes.h`. `pData` is `NULL`.
`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 `fpFilterConfig()` function once for each type. You can also modify element extraction settings by using the `kvxconfig.ini` file. See Configure Element Extraction for XML Documents. `nValue` is set to `0`. `pData` is a pointer to the KVXConfigInfo structure.
`KVFLT_INCLREVISIONMARK` | If you set this flag to `TRUE`, text that was deleted from a document with revision tracking enabled is extracted from the document and included in the filtered output. To reset the flag and exclude deleted text from the filtered output, set the flag to `FALSE` (the default). See Extract Deleted Text Marked by Tracked Changes. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_SETSRCPASSWORD` | This flag enables you to define a password used to open a password-protected file for filtering. See Filter Password Protected Files. `nValue` is the length of the password. `pData` is the source file password, which can have a maximum length of 255 characters.
`KVFLT_NOEMBEDDEDOBJECT` | If you set this flag to `TRUE`, the text of embedded previews in Microsoft Word (DOC, DOCX), Excel (XLSX), and PowerPoint (PPT, PPTX) documents is not included in the filter output. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_SHOWHIDDENTEXT` | If you set this flag to `TRUE`, hidden text from Microsoft Word, Excel, and PowerPoint documents is extracted. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_NOCOMMENTS` | If you set this flag to `TRUE`, comments from Microsoft Word, PowerPoint, or Excel documents are not extracted. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_SKIPEMBEDDEDFONT` | If you set this flag to `TRUE`, text that contains embedded fonts is not filtered from PDF documents. See Filter PDF Files. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_SHOWDATEFIELDCODE` | If you set this flag to `TRUE`, date/time field codes are extracted from Microsoft Word, PowerPoint, and Rich Text Format documents instead of the date/time values. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_SHOWFILENAMEFIELDCODE` | If you set this flag to `TRUE`, file name field codes are extracted from Microsoft Word documents. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_KEEPSOFTHYPHEN` | If you set this flag to `TRUE`, soft hyphens are retained when text is filtered from PDF documents. See Filter PDF Files. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_EXPORTALLMETADATA` | If you set this flag to `TRUE`, all custom metadata is filtered from PDF documents when the metadata APIs are used. See Extract Custom Metadata from PDF Files. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_EXPORTTAGGEDCONTENT` | If you set this flag to `TRUE`, tagged PDF content is filtered from PDF documents. See Filter Tagged PDF Content. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_SetConfigurableArguments` | If you set this flag to `TRUE`, the `pData` is a variable of configurable arguments. `nValue` is `TRUE` or `FALSE`. `pData` is a variable of configurable arguments.
`KVFLT_SETOUTPUTCHARSET` | This flag enables the output character set to be changed. `pData` is one of the character encodings defined in the `KVCharSet` enumerated type in `kvtypes.h`.
`KVFLT_SHOWHIDDENTEXT` | If you set this flag to `TRUE`, hidden text from Microsoft Word, Excel, PowerPoint, and PDF documents is extracted. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_EXTRACTIMAGES` | If you set this flag to `TRUE`, the extract API also extracts images contained within the file. See Extract Images for more details. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_TABDELIMITED` | If you set this flag to `TRUE`, tables in word processing formats are output in tab delimited formats. See Tab Delimited Output for Embedded Tables for more details. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_STANDARDIZECELLFORMATS` | If you set this flag to `TRUE`, standardization of cell formats in Microsoft Excel files is enabled. See Standardize Cell Formats. `nValue` is `TRUE` or `FALSE`. `pData` is `NULL`.
`KVFLT_SOURCECODEDETECTION` | If you enable this option, KeyView attempts to identify the programming language of any source code files that it finds. The `nValue` argument specifies the level of identification to attempt. See Source Code Identification. NOTE: Source code identification is a new, experimental feature in KeyView 12.0. `nValue` is `KVSOURCECODE_OFF`, `KVSOURCECODE_ENABLED`, or `KVSOURCECODE_EXTENDED`. `pData` is `NULL`.

## 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);

© Copyright 2016-2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm