KeyView 23.2

# Extract Custom Metadata from PDF Files

You can extract custom metadata from PDF files either by specifying individual metadata tag names, or by extracting all custom metadata at once.

## Extract Custom Metadata by Tag

To extract custom metadata by metadata tag, add the custom metadata names to the `pdfsr.ini` file provided, and copy the modified file to the `bin` directory. You can then extract metadata as you normally would.

The `pdfsr.ini` is in the directory `samples\pdfini`, and has the following structure:

    <META>
    <TOTAL>total_item_number</TOTAL>,
    /metadata_tag_name datatype,
    </META>

Parameter | Description
--- | ---
`total_item_number` | The total number of metadata tags that are listed.
`metadata_tag_name` | The metadata tag name used in the PDF files.
`datatype` | The data type of the metadata field. Data types are defined in KVSumInfoType.

For example:

    <META>
    <TOTAL>4</TOTAL>
    /part_number      INT4
    /volume           INT4
    /purchase_date    DATETIME
    /customer         STRING
    </META>

## Extract All Custom Metadata

You can extract all metadata through the API.

To extract all metadata by using the API

1. Call the fpInit() function.

2. Call the fpSetConfig() function with the following arguments:

   Argument | Parameter
   --- | ---
   `nType` | `KVFLT_EXPORTALLMETADATA`
   `nValue` | `TRUE`
   `pData` | `NULL`

   For example:

       (*fpSetConfig)(pKVFilter, KVFLT_EXPORTALLMETADATA, TRUE, NULL);

3. Call the fpGetOLESummaryInfo() or fpGetOLESummaryInfoFile() function.

Copyright 2016-2023 Open Text
Version 23.2 | Last updated March 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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL KeyView 23.2

Topic Title: Extract Custom Metadata from PDF Files