Enumerations — Aspose.Note FOSS for Python API Reference

Properties

Alle Aufzählungen werden direkt aus dem aspose.note Paket:

from aspose.note import SaveFormat, FileFormat, HorizontalAlignment, NodeType

Alle Enum-Mitglieder sind standard Python enum.Enum Instanzen.


SaveFormat

Properties: from aspose.note import SaveFormat

Gibt das Ausgabeformat an, das übergeben wird an Document.Save().

PropertiesString-WertStatus in v26.3.1
SaveFormat.Pdf"pdf"Implementiert — erfordert pip install "aspose-note[pdf]"
SaveFormat.One"one"Nicht implementiert — wirft UnsupportedSaveFormatException

Properties

from aspose.note import Document, SaveFormat

doc = Document("MyNotes.one")

##Save to PDF (implemented)
doc.Save("output.pdf", SaveFormat.Pdf)
from aspose.note import SaveFormat

##Iterate all members
for fmt in SaveFormat:
    print(fmt.name, fmt.value)

FileFormat

Properties: from aspose.note import FileFormat

Stellt die OneNote-Dateiformatversion dar. Verwendet von Document.FileFormat.

PropertiesString-WertProperties
FileFormat.OneNote2010"onenote2010"Standard OneNote 2010 / OneNote für Windows 10 Abschnittsformat
FileFormat.OneNoteOnline"onenoteonline"OneNote Online-Format
FileFormat.OneNote2007"onenote2007"Legacy OneNote 2007-Format

Document.FileFormat Hinweis: Der Document.FileFormat Die Eigenschaft gibt einen best‑effort‑Hinweis auf die OneNote-Dateiformatversion.

Properties

from aspose.note import Document, FileFormat

doc = Document("MyNotes.one")
if doc.FileFormat == FileFormat.OneNote2010:
    print("OneNote 2010 format")

HorizontalAlignment

Properties: from aspose.note import HorizontalAlignment

Horizontale Ausrichtung von Text oder Objekt. Für API‑Kompatibilität deklariert; wird in v26.3.1 derzeit auf keinen Knoten angewendet.

PropertiesString-Wert
HorizontalAlignment.Left"left"
HorizontalAlignment.Center"center"
HorizontalAlignment.Right"right"

Properties

from aspose.note import HorizontalAlignment

alignment = HorizontalAlignment.Left
print(alignment.value)  # "left"

NodeType

Properties: from aspose.note import NodeType

Symbolische Namen für die Knotentypen im Document Object Model. Deklariert für API‑Kompatibilität; nicht von der öffentlichen API zur Knotenerkennung in v26.3.1 verwendet (verwenden isinstance Prüfungen oder GetChildNodes(Type) stattdessen).

PropertiesString-WertEntsprechende Klasse
NodeType.Document"document"Document
NodeType.Page"page"Page
NodeType.Outline"outline"Outline
NodeType.OutlineElement"outline_element"OutlineElement
NodeType.RichText"rich_text"RichText
NodeType.Image"image"Image
NodeType.Table"table"Table
NodeType.AttachedFile"attached_file"AttachedFile

Properties

from aspose.note import NodeType

##Inspect all members
for nt in NodeType:
    print(nt.name, "->", nt.value)
from aspose.note import NodeType

##Compare by value string
node_type_value = "rich_text"
if node_type_value == NodeType.RichText.value:
    print("This is a RichText node type")

Bevorzugte Knotenidentifikation: In der Praxis verwenden isinstance(node, RichText) oder page.GetChildNodes(RichText) statt NodeType Vergleiche.


Siehe auch

 Deutsch