# fpGetXmpInfoFile()

This function extracts XMP metadata from a file.

## Syntax

    KVErrorCode pascal fpGetXmpInfoFile(
        void            *pMainContext,
        char            *szInputFile,
        KVXmpInfo       *pXmpInfo,
        DWORD            dwXmpOptions );

## Arguments

`pMainContext` | A pointer to the `TPMainContext` structure, which is defined in `kvtypes.h`.
`szInputFile` | A pointer to the input file.
`pXmpInfo` | A pointer to the KVXmpInfo structure.
`dwXmpOptions` | Set this argument to `1` to return charset information, the raw XMP packet, and the path and value pairs of all XMP elements. Set this argument to `2` to return the raw XMP packet.

## Returns

The return value is an error code. See KVErrorCode.

## Discussion

- After the `pXmpInfo` argument is successfully filled, and its data is no longer required, call fpFreeXmpInfo() to free the memory allocated by this function.

- This function runs in process or out of process. See The Filter Process Model.

- XMP extraction is supported only for certain platforms and formats.

  - On Windows, Linux, AIX, and macOS platforms, XMP extraction is supported for the following formats:

    - PDF (PDF_Fmt)

    - PNG (PNG_Fmt)

    - PSD (PSD_Fmt)

    - JPG (JPEG_File_Interchange_Fmt)

    - TIFF (TIFF_Fmt)

    - XML (XML_Fmt)

    - pFile (RMS_Protected_Fmt)

  - On Windows, Linux, and macOS platforms, XMP extraction is additionally supported for the following formats:

    - GIF (GIF_87a_Fmt / GIF_89a_Fmt)

    - jpeg2000 (JPEG_2000_JP2_File_Fmt)

    - SVG (SVG_Fmt)

    - MOV (QuickTime_Fmt)

    - AIFF (AIFF_Fmt)

    - FLV (Flash_Video_Fmt)

    - SWF (Macromedia_Flash_Fmt)

    - MP3 (MPEG_Audio_Fmt)

    - MPEG4 (ISO_IEC_MPEG_4_Fmt)

    - WAV (MS_WAVE_Audio_Fmt)

    - AVI (MS_Video_Fmt)

    - EPS (EPSF_Fmt, Preview_EPSF_Fmt)

    - INDD (InDesign_Fmt)

    - WMA (WMA_Fmt)

    - WMV (WMV_Fmt)

    - HTML (HTML_Fmt)

_FT_HTML5_bannerTitle.htm