IDocumentInfo class
Leave feedback
On this page
Provides common information about a loaded document.
Learn more
The IDocumentInfo type exposes the following members:
| Property | Description |
|---|---|
| file_type | The file type of the loaded document. |
| is_encrypted | The property indicates whether the document is encrypted and requires a password to open. |
| page_count | The number of pages (slides, worksheets, etc) in the loaded document. |
| pages | The collection of objects representing common information about the document pages (slides, worksheets, etc). |
| size | The size of the loaded document in bytes. |
from groupdocs.metadata import Metadata, Constants, FileFormat
metadata = Metadata(Constants.InputXlsx)
if metadata.file_format != FileFormat.UNKNOWN:
info = metadata.get_document_info()
print(f"File format: {info.file_type.file_format}")
print(f"File extension: {info.file_type.extension}")
print(f"MIME Type: {info.file_type.mime_type}")
print(f"Number of pages: {info.page_count}")
print(f"Document size: {info.size} bytes")
print(f"Is document encrypted: {info.is_encrypted}")
- module
groupdocs.metadata.common
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.