Enumerations — Aspose.Note FOSS for Python API Reference

Properties

Totes les enumeracions s’exposen directament des del aspose.note paquet:

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

Tots els membres de l’enumeració són estàndard Python enum.Enum instàncies.


SaveFormat

Properties: from aspose.note import SaveFormat

Indica el format de sortida passat a Document.Save().

PropertiesValor de cadenaEstat a la v26.3.1
SaveFormat.Pdf"pdf"Implementat — requereix pip install "aspose-note[pdf]"
SaveFormat.One"one"No implementat — llança 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

Representa la versió del format de fitxer OneNote. Utilitzat per Document.FileFormat.

PropertiesValor de cadenaProperties
FileFormat.OneNote2010"onenote2010"Format d’apartat estàndard de OneNote 2010 / OneNote per a Windows 10
FileFormat.OneNoteOnline"onenoteonline"Format de OneNote Online
FileFormat.OneNote2007"onenote2007"Format llegat de OneNote 2007

Document.FileFormat nota: El Document.FileFormat La propietat proporciona una indicació de millor esforç de la versió del format de fitxer OneNote.

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

Alineació horitzontal de text o objecte. Declarada per compatibilitat de l’API; actualment no s’aplica a cap node a la versió v26.3.1.

PropertiesValor de cadena
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

Noms simbòlics per als tipus de node al model d’objecte del document. Declarats per a la compatibilitat de l’API; no utilitzats per l’API pública per a la identificació de nodes a la versió v26.3.1 (utilitzeu isinstance comprovacions o GetChildNodes(Type) en lloc d’això).

PropertiesValor de cadenaClasse corresponent
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")

Identificació de node preferida: En la pràctica, utilitzeu isinstance(node, RichText) o page.GetChildNodes(RichText) en lloc de NodeType comparacions.


Vegeu també

 Català