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

NameTypeAccessDescription
FileFormatFileFormatReadGets the file format.
DisplayNamestr | NoneReadGets the display name.
CreationTimedatetime | NoneReadGets the creation time.
FirstChildNode | NoneReadGets the first child.
LastChildNode | NoneReadGets the last child.
ParentNodeNode | NoneReadGets the parent node.
DocumentDocument | NoneReadGets the document.

Methods

SignatureDescription
__init__(source: str | Path | BinaryIO | None, load_options: LoadOptions | None)
DetectLayoutChanges()Detects changes in the document layout and updates internal state
GetPageHistory(page: Page)PageHistoryReturns 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)

See Also

 English