get_document_info method

get_document_info

Retrieves source document information, including page count and other properties specific to the file type.

def get_document_info(self):
    ...

Returns: DocumentInfo: An object containing details such as format, pages count, creation date, size, and other type‑specific attributes.

Example

from groupdocs.conversion import Converter

with Converter("document.pdf") as converter:
    info = converter.get_document_info()
    print(f"Pages: {info.pages_count}, Format: {info.format}")

See Also