fpInitWithLicenseData()

This function initializes an Export session with license information passed in function parameters rather than a license file. If initialization is successful, it sets the KVPDFContext value pointed to by pContext to a valid context identifier. You must pass this context value as the first parameter to all other PDF Export functions.

This function is similar to fpInit(), but it uses a different licensing method. You can use either fpInit() or fpInitWithLicenseData to initialize your Export session. However, these functions are mutually exclusive. That is, neither takes the context pointer from the other as an argument. If you call both functions, you initialize two distinct Export sessions, in the same way as calling fpInit() twice.

Syntax

KVPDFState pascal fpInitWithLicenseData(
   const char* const pszKeyViewDir,
   const char* const pszTempFolder,
   const char* const pszLicenseOrganization,
   const char* const pszLicenseKey,
   /*out*/ KVPDFContext* const pContext);

Arguments

pszKeyViewDir

A null-terminated C string that contains the path of the directory where the Export components are located. This is normally the directory install\OS\bin, where install is the path name of the Export installation directory and OS is the name of the operating system.

pszLicenseOrganization

A pointer to a string that contains the organization name under which this installation of KeyView is licensed. This value is the company name that appears at the top of the license key provided by Micro Focus. Add the text exactly as it appears in this file.

pszLicenseKey

A pointer to a string that contains the license key for this installation of KeyView. This value is the appropriate license key provided by Micro Focus. The key is a string that contains 31 characters, for example 2TQD22D-2M6FV66-2KPF23S-2GEM5AB. Type these characters exactly as they appear in the license key file, including the dashes, but do not include any leading or trailing spaces.

pszTempFolder

(Optional) A null-terminated C string that contains the path of a directory to use to store temporary files during the conversion process. Set this value to NULL to default to the system temporary directory.

pContext

A valid pointer to a value of type KVPDFContext. If initialization is successful, this target is set to a context-identifying value, which you must supply to subsequent export functions.

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