get_document_info method

On this page

get_document_info

Gets the information about the format of the loaded document.

Learn more about getting the document information.

def get_document_info(self):
    ...

Returns: IDocumentInfo: The instance that contains detected information.

Example

    from groupdocs.watermark import Watermarker

    with Watermarker("./sample.docx") as watermarker:
        info = watermarker.get_document_info()
        print("File type:", info.file_type)
        print("Pages:", info.page_count)
        print("Size, bytes:", info.size)
    ```

### See Also
* class [`Watermarker`](/watermark/python-net/groupdocs.watermark/watermarker/)

On this page