File Content Extraction 26.1
PDF Export SDK C Programming Guide

# KVPDFState

This structure is returned by PDF export functions to indicate whether they were successful, and if they failed to give the reason why.

    typedef struct
    {
        KVErrorCode	eErrorCode;
        KVErrorCodeEx	eErrorCodeEx;
    }
    KVPDFState;

## Member Descriptions

`eErrorCode` | The error code returned by File Content Extraction. This enumerated type is defined in `kverrorcodes.h`.
`eErrorCodeEx` | The extended error code returned by File Content Extraction. This enumerated type is defined in `kverrorcodes.h`.

## Discussion

To evaluate a `KVPDFState` object, check `eErrorCode` first. A value of `KVERR_Success (0)` indicates success. Any other value indicates failure.

You can ignore `eErrorCodeEx` unless `eErrorCode` is `KVERR_General`. In this case, `eKVErrorCodeEx` might contain an extended error code that gives more information. If no more detail is available, `eKVErrorCodeEx` is set to 0.

## Example

In this example, a state object is used to obtain the error code as an integer.

    int convertStateToError(const KVPDFState state)
    {
    	if (state.eErrorCode == KVERR_General && state.eErrorCodeEx != (KVErrorCodeEx)0)
    	{
    		return state.eErrorCodeEx;
    	}

    	return state.eErrorCode;
    }

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: KVPDFState