# Example

Below is an example of a call to `fpGetOLESummaryInfo()`:

    {
      KVSummaryInfoEx    si;
      memset( &si, 0, sizeof(si) );
      if ( KVERR_Success != (*pInterface->fpGetOLESummaryInfo)( pKVFilter, pInput, &si ) )
      {
          fprintf( fpOut, "Error obtaining summary information\n" );
          return;
      }
      if ( si.nElem == 0 )
      {
          fprintf( fpOut, "No summary information\n" );
          goto end;
      }
      PrintSummaryInfo(&si, fpOut);
    end:
      (*pInterface->fpFreeOLESummaryInfo)( pKVFilter, &si );
    }

where:

`pKVFilter` | A pointer returned from fpInit() or fpInitWithLicenseData().
`pInput` | A pointer to the developer-assigned instance of KVInputStream. The structure `KVInputStream` defines the input stream that contains the source.
`si` | Points to the structure KVSummaryInfoEx. In the structure, `nElem` provides a count of the number of metadata elements, and `pElem` points to the first element of the array of individual elements, as defined by the structure KVSumInfoElemEx.

To interpret the metadata after `fpGetOLESummaryInfo()` is called and returns a non-zero status:

- If `si.nElem` is zero, the document did not contain metadata. If `si.nElem` is not zero, `si.nElem` is the number of metadata elements contained in the array.
- Each `KVSumInfoElemEx` structure contains the following information for each metadata element:

`si.pElem[n].isValid` | Specifies whether the data value is present in the document. `1` specifies that the value is valid. For example, if the "Title" element was not populated in the document, `si.pElem[1].isValid == 0` would evaluate to true.
`si.pElem[n].type` | Specifies the data type of the metadata element. The types are defined in the structure KVSumInfoType in `kvtypes.h`.
`si.pElem[n].data` | A pointer to the content of the element. If `type` is `KV_Int4` or `KV_Bool`, then `data` contains the actual value. Otherwise, `data` is a pointer to the actual value. `KV_DateTime` and `KV_IEEE8` point to an 8-byte value. `KV_String` and `KV_Unicode` point to the beginning of the string that contains the text. `KV_Unicode` is replaced with `KV_String` when the UNICODE value has been character mapped to the desired output character set, as specified in the call to `fpInit()`.
`si.pElem[n].pcType` | The name of the metadata field.

© Copyright 2016-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm