'Retrieves XMP (Extensible Metadata Platform) data from the PDF document
root.
:return: a :class:`XmpInformation<xmp.XmpInformation>`
instance that can be used to access XMP metadata from the document.
:rtype: :class:`XmpInformation<xmp.XmpInformation>` or
``None`` if no metadata was found on the document root.'

def getXmpMetadata(self):

    try:
        self._override_encryption = True
        return self.trailer['/Root'].getXmpMetadata()
    finally:
        self._override_encryption = False
