# fpConvertFileToFile()

This function converts a source file to an output PDF file.

## Syntax

    KVPDFState pascal fpConvertFileToFile(
        const KVPDFContext context,
        const char* const pszInFileName,
        const char* const pszOutFileName,
        const KVPDFOptions 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 PDF.
`pszOutFileName` | A null-terminated C string that contains the full file path where the export process must create the PDF. This value cannot be the current working directory.
`options` | A `KVPDFOptions` structure to set default page dimensions (for when none can be obtained from the source file), or to specify a password to use when the input file is password protected. Initialize a `KVPDFOptions` 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 PDF files in the current working directory.

- If the target PDF 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.

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

_FT_HTML5_bannerTitle.htm