get_document_info method

get_document_info

Retrieves the information about a document stored in the attached file.

def get_document_info(self):
    ...

Returns: IDocumentInfo: An instance that contains detected information.

Example

from groupdocs.watermark import Watermarker
from groupdocs.watermark.options.email import EmailLoadOptions

with Watermarker("./message.msg", EmailLoadOptions()) as watermarker:
    content = watermarker.get_content()
    for attachment in content.attachments:
        info = attachment.get_document_info()
        print(f"{attachment.name}: type={info.file_type}")

See Also