# Public Function GetMetadata() as String

**Returns PDF document metadata as XML string.**

**Defined in**

`SwPDFDocument`

**Syntax**

`metadata = swPDFDocument.GetMetadata()`

**Return value**

Metadata as XML string.

Root XML node is "**pdf-info**".

Child nodes have two attributes:

* "**meta name**" which holds field name or custom meta key
* "**content**" which holds field value or custom meta value

XML Sample:

![](https://3331713008-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MlCAurE6RSGoCmtmAET%2F-MlGC6u12dA_wq1q71wQ%2F-MlGDjvTVaa9isxT2hqT%2Fimage.png?alt=media\&token=84a81c69-ad84-472f-bd3b-63fbb5706916)
