Some file formats contain additional documentation (metadata) about document contents. This sample program makes use of the metadata_map API method to provide metadata fields and values.

The fields that are present vary depending on file type and the individual document. For example, running the sample program on a PDF file produces output similar to the following:

$ ./metadata KeyView_11.0_OS3P.pdf
AppName: madbuild
Author: Hewlett Packard Enterprises Development LP
Create_DTM: 2016-02-09T16:15:51Z
LastSave_DTM: 2016-02-09T16:15:51Z
PageCount: 43
Title: HPE KeyView 11.0 Open Source and Third-Party Software Agreements