DynaPDF.GetMetadata
-------------------

Queries metadata from PDF.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [5.2](newinversion52.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.GetMetadata"; PDF; ObjType { ; Handle } ) 

**MBS**( **"DynaPDF.GetMetadata";** /\* Queries metadata from PDF. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$ObjType**; /\* The object type. Can be Catalog, Font, Image, Page or Template.e.g. "Catalog" \*/   
**$Handle**) /\* Optional; Object handle or -1 for the catalog object.e.g. -1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| ObjType | The object type. Can be Catalog, Font, Image, Page or Template. | "Catalog" |  |
| Handle | Object handle or -1 for the catalog object. | -1 | Optional |

### Result

Returns text or error.

### Description

Queries metadata from PDF.  
Reads the optional metadata streams of pages, fonts, images, pages, templates, as well as the global metadata stream that is associated with the Catalog object. Metadata streams are in XMP format that is a superset of XML.   
The global metadata stream will be created when this function is called. The returned stream is a preview of the XMP stream that will be stored in the file when DynaPDF.CloseFile or DynaPDF.CloseFileEx is called. Note that the creation and modification date will be updated when the file is closed (except if the stream will be modified or replaced with [DynaPDF.SetMetadata](DynaPDFSetMetadata.md)).   
The original global XMP stream of external PDF files can be accessed with [DynaPDF.GetInMetadata](DynaPDFGetInMetadata.md).   
Metadata streams are optional and maybe not present. The function returns true if no error occurs, also if no metadata stream is present. The caller must also check whether the text returned has a length greater than zero to determine whether stream data was returned.   
See also [GetMetadata](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetMetadata.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetInMetadata](DynaPDFGetInMetadata.md)
- [DynaPDF.GetLeading](DynaPDFGetLeading.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetMetadata](DynaPDFSetMetadata.md)

### Blog Entries

- [MBS FileMaker Plugin, version 5.2pr9](https://www.mbsplugins.de/archive/2015-08-01/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 29th July 2015 , last changed 29th July 2015

  
[DynaPDF.GetMetaConvFlags](DynaPDFGetMetaConvFlags.md) - [DynaPDF.GetNeedAppearance](DynaPDFGetNeedAppearance.md)

[HTML Version](DynaPDFGetMetadata.shtml)