fpSelectPDFPages()

This function tells KeyView to convert only a subset of pages from a PDF. 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 returned from fpInit() or fpInitWithLicenseData().

pPageSelection A pointer to a KVPageSelection structure that tells KeyView which pages to select.

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, KeyView will convert all pages as normal, unless you call fpSelectPDFPages() again.

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