File Content Extraction 26.1
PDF Export SDK C Programming Guide

# fpInit()

This function initializes an Export session. If initialization is successful, the `KVPDFContext` value pointed to by `pContext` is set to a valid context identifier. This context value must be passed as the first parameter to all other PDF Export functions.

## Syntax

    KVPDFState pascal fpInit(
        const char* const pszKeyViewDir,
        const char* const pszTempFolder,
        const char* const pszLicense,
        KVPDFContext* const pContext
    );

## Arguments

`pszKeyViewDir` | A null-terminated C string that contains the path of the directory where the Export components are located. This is normally the directory `install\OS\bin`, where `install` is the path name of the Export installation directory and `OS` is the name of the operating system.
`pszTempFolder` | (Optional) A null-terminated C string that contains the path of a directory to use to store temporary files during the conversion process. Set this value to NULL to default to the system temporary directory.
`pszLicense` | A pointer to a string that contains your license key, as provided by OpenText. Copy the key exactly, with no leading or trailing spaces.
`pContext` | A valid pointer to a value of type `KVPDFContext`. If initialization is successful, this target is set to a context-identifying value, which you must supply to subsequent export functions.

## Returns

- If the call is successful, a `KVPDFState` structure with `eErrorCode` set to `KVERR_Success`.

- If the call is unsuccessful, a `KVPDFState` structure that indicates the reason for the error.

## Discussion

- You can perform multiple calls to subsequent functions in serial using the same context (session).

- On Windows systems, specify the paths (`pszKeyViewDir` and `pszTempFolder`) in the local Windows code page.

- To ensure multithreaded conversions are thread-safe, you must create a unique context pointer for every thread by calling `fpInit()`. In addition, threads must not share context pointers, and you must use the same context pointer for all API calls in the same thread.

- When the conversion context is no longer required, you must terminate by calling fpShutDown().

- Internally, `KVPDFContext` is a pointer, and OpenText recommends that you initialize values of type `KVPDFContext` to NULL.

- If the call is unsuccessful, the value pointed to by `pContext` is not modified. No context has been created so there is no need to call `fpShutdown()`.

  IMPORTANT: It is not safe to call `fpShutdown()` with any value other than one arising from a successful call to `fpInit()` (or NULL).

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 26.1

Topic Title: fpInit()