File Content Extraction 25.4
HTML Export SDK C Programming Guide

# fpSelectPDFPages()

This function selects a subset of pages from a PDF, so that you can convert just those pages. For more information, see Convert a Subset of Pages.

## Syntax

    KVErrorCode pascal fpSelectPDFPages(void*, const KVPageSelection* const);
       void* pContext,
       const KVPageSelection* const pPageSelection);

## Arguments

`pContext` | A pointer to an Export session that you initialized by calling fpInit().
`pPageSelection` | A pointer to a KVPageSelection structure that identifies the pages.

## Returns

The return value is one of the error codes defined in KVErrorCode in `kverrorcodes.h`.

## Discussion

This function runs in-process or out-of-process. See Convert Files Out-of-Process.

When you convert out-of-process, you must call this function after the call to KVHTMLStartOOPSession(). You must then call fpConvertStream() or KVHTMLConvertFile() to convert a file with the selection before you call KVHTMLEndOOPSession().

After `fpSelectPDFPages()` returns, you may free any memory associated with the `pPageSelection` passed in.

When you use this function to select particular pages, your next call to fpConvertStream() or KVHTMLConvertFile() must be to convert a PDF file, and you must use the pdf2sr reader to convert PDF files. After you call one of these functions, whether it succeeded or returned an error, the page selection is unset. For the next file, File Content Extraction will convert all pages as normal, unless you call `fpSelectPDFPages()` again.

If you call `fpSelectPDFPages()` multiple times without calling fpConvertStream() or KVHTMLConvertFile(), File Content Extraction uses the most recent page selection, and discards page selections from previous calls.

Copyright 1997-2025 Open Text
Version 25.4 | Last updated October 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.4

Topic Title: fpSelectPDFPages()