KeyView 24.1

# KVPDFOptions

This structure modifies PDF Export options.

    typedef struct
    {
    	KVStructHeader;
    	char pszSourceFilePassword[MAX_PASSWORD_LEN];
    	double pageWidthInches;
    	double pageHeightInches;
    }
    KVPDFOptions;

## Member Descriptions

`KVStructHeader` | The KeyView version of the structure. See KVStructHead.
`pszSourceFilePassword` | A fixed length char array, which should either be left zero-filled, or contain a password as a null-terminated C string.
`pageWidthInches` | The default page width to use when a page width cannot be determined from the source document, in inches.
`pageHeightInches` | The default page height to use when a page height cannot be determined from the source document, in inches.

## Discussion

KeyView attempts to determine appropriate page dimensions from a file before resorting to using `pageWidthInches` and `pageHeightInches`. KeyView could use, for example, the height of slides in a presentation format file or the right-most column filled in a spreadsheet.

Unless both `pageWidthInches` and `pageHeightInches` are specified, they must both be equal to zero.

US letter dimensions are used when no dimensions can be obtained from a document and `pageWidthInches` and `pageHeightInches` are not set.

## Examples

In this example, an options structure is filled with a password (`pszPassword` here). You might use this option in a call to fpConvertFileToFile() to open a password protected document.

    KVPDFOptions getPDFOptionsStructContainingPassword(const char* const pszPassword)
    {
        KVPDFOptions sOptions = {0};
        KVStructInit(&sOptions);
        // Copy ensuring the password is always null-terminated.
        strncpy(sOptions.pszSourceFilePassword, pszPassword, MAX_PASSWORD_LEN - 1);
        return sOptions;
    }

The following example shows a function that sets the default page width and height in a `KVPDFOptions` structure. KeyView uses these values when it cannot determine appropriate page dimensions from the input file.

    void setPageWidthAndHeight(
        KVPDFOptions* const optionsStructToDecorate,
        const double pageWidthInInches,
        const double pageHeightInInches)
    {
        optionsStructToDecorate->pageWidthInches = pageWidthInInches;
        optionsStructToDecorate->pageHeightInches = pageHeightInInches;
    }

Copyright 1997-2023 Open Text
Version 24.1 | Last updated December 2023

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: IDOL KeyView 24.1

Topic Title: KVPDFOptions