DocumentInfo class
Leave feedback
On this page
The base implementation for retrieving polymorphic document information.
Instances are returned by Converter.get_document_info() and expose metadata such as format, page count, creation date, size, and format‑specific attributes.
The DocumentInfo type exposes the following members:
| Method | Description |
|---|---|
| get | |
| get_file | |
| get_string |
| Property | Description |
|---|---|
| creation_date | The creation date of the document. |
| format | The format of the document. |
| pages_count | The total number of pages in the document. |
| property_names | The property implements IDocumentInfo.property_names. |
| size | The size of the document in bytes. |
from groupdocs.conversion import Converter
def show_document_info(path):
with Converter(path) as converter:
info = converter.get_document_info()
print("Format:", info.format)
print("Pages count:", info.pages_count)
print("Creation date:", info.creation_date)
print("Size (bytes):", info.size)
# Example usage
show_document_info("./lorem-ipsum.txt")
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.