File Content Extraction 25.1
PDF Export SDK C Programming Guide

# fpCreateThumbnailForFile()

This functions converts a source file to an output PNG thumbnail file.

## Syntax

    KVPDFState pascal fpCreateThumbnailForFile(
       const KVPDFContext context,
       const char* const pszInFileName,
       const char* const pszOutFileName,
       const unsigned int widthPixels,
       const unsigned int heightPixels,
       const KVPDFThumbnailOptions options)

## Arguments

`Context` | A context value obtained by using fpInit().
`pszInFileName` | A null-terminated C string that contains the path of the file to export to PNG.
`pszOutFileName` | A null-terminated C string that contains the full file path where the export process must create the PNG. This value cannot be the current working directory.
`widthPixels` | The width of the output bounding box in pixels.
`heightPixels` | The height of the output bounding box in pixels.
`options` | A KVPDFThumbnailOptions structure. Initialize a KVPDFThumbnailOptions structure with the `KVStructInit()` macro, and then modify the structure as necessary.

## 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 cannot create PNG files in the current working directory.

- If the target PNG file exists, this function overwrites it if possible.

- On Windows systems, specify the paths in the local Windows code page.

- You must initialize the options structure by using the `KVStructInit()` macro.

- The output thumbnail is created to fit in the bounding box that you specify with `widthPixels` and `heightPixels`, but it maintains the correct aspect ratio.

- Usage of this function is licensed separately.

- On Windows, `pszInFileName` and `pszOutFileName` must be in the local Windows code page.

Copyright 1997-2024 Open Text
Version 25.1 | Last updated January 2025

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 25.1

Topic Title: fpCreateThumbnailForFile()