get_document_info method
Leave feedback
On this page
Retrieves the general information about the document, such as size and page count.
def get_document_info(self):
...
Returns: IDocumentInfo: General document information.
| Raises | Description |
|---|---|
PasswordRequiredException |
Raised when the document is password protected. |
IncorrectPasswordException |
Raised when an invalid password is provided. |
from groupdocs.redaction import Redactor
with Redactor("./sample.docx") as redactor:
info = redactor.get_document_info()
print(f"File type: {info.file_type}")
print(f"Number of pages: {info.page_count}")
print(f"Document size: {info.size} bytes")
- class
Redactor
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.