Document
Overview
Document is a class in Aspose.Note FOSS for Python.
Inherits from: CompositeNode.
Document.Save writes the document to a file, stream, or path using the given format or options.
This class provides 11 methods for working with Document objects in Python programs.
Available methods include: Accept, AppendChildFirst, AppendChildLast, DetectLayoutChanges, GetChildNodes, GetEnumerator, GetPageHistory, InsertChild, RemoveChild, Save, __init__.
All public members are accessible to any Python application after installing the Aspose.Note FOSS for Python package.
Properties: CreationTime, DisplayName, Document, FileFormat, FirstChild, LastChild, and 1 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
FileFormat | FileFormat | Read | Gets the file format. |
DisplayName | str | None | Read | Gets the display name. |
CreationTime | datetime | None | Read | Gets the creation time. |
FirstChild | Node | None | Read | Gets the first child. |
LastChild | Node | None | Read | Gets the last child. |
ParentNode | Node | None | Read | Gets the parent node. |
Document | Document | None | Read | Gets the document. |
Methods
| Signature | Description |
|---|---|
__init__(source: str | Path | BinaryIO | None, load_options: LoadOptions | None) | |
DetectLayoutChanges() | Detects changes in the document layout and updates internal state |
GetPageHistory(page: Page) → PageHistory | Returns the history information for the specified page |
Save(target: str | Path | BinaryIO, format_or_options: SaveFormat | SaveOptions | None) | Writes the document to a file, stream, or path using the given format or options |
AppendChildLast(node: TNode) → TNode | |
AppendChildFirst(node: TNode) → TNode | |
InsertChild(index: int, node: TNode) → TNode | |
RemoveChild(node: Node) | |
GetEnumerator() → Iterator[Node] | |
GetChildNodes(node_type: type[TNode]) → list[TNode] | |
Accept(visitor: DocumentVisitor) |