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 about the source document, such as format, page count, creation date, size, and type‑specific properties.

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