Enumerations

Enumerations — Aspose.Note FOSS for Python API Reference

ImageRenderOptions

Visas uzskaitījumi tiek tieši pieejami no aspose.note pakotnes:

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

Visi uzskaitījuma locekļi ir standarta Python enum.Enum instancēm.


SaveFormat

ImageRenderOptions: from aspose.note import SaveFormat

Norāda izvades formātu, kas nodots Document.Save().

ImageRenderOptionsVirknes vērtībaStatuss versijā v26.3.1
SaveFormat.Pdf"pdf"Īstenots — prasa pip install "aspose-note[pdf]"
SaveFormat.One"one"Nav īstenots — izsauc UnsupportedSaveFormatException

ImageRenderOptions

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

ImageRenderOptions: from aspose.note import FileFormat

Attēlo OneNote datnes formāta versiju. Lieto Document.FileFormat.

ImageRenderOptionsVirknes vērtībaImageRenderOptions
FileFormat.OneNote2010"onenote2010"Standarta OneNote 2010 / OneNote for Windows 10 sadaļas formāts
FileFormat.OneNoteOnline"onenoteonline"OneNote Online formāts
FileFormat.OneNote2007"onenote2007"Mantotais OneNote 2007 formāts

Document.FileFormat piezīme: Šis Document.FileFormat īpašība sniedz labāko iespējamā mēģinājuma norādi par OneNote faila formāta versiju.

ImageRenderOptions

from aspose.note import Document, FileFormat

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

HorizontalAlignment

ImageRenderOptions: from aspose.note import HorizontalAlignment

Teksta vai objekta horizontālā līdzināšana. Deklarēts API saderībai; pašlaik netiek piemērots nevienam mezglam v26.3.1.

ImageRenderOptionsVirknes vērtība
HorizontalAlignment.Left"left"
HorizontalAlignment.Center"center"
HorizontalAlignment.Right"right"

ImageRenderOptions

from aspose.note import HorizontalAlignment

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

NodeType

ImageRenderOptions: from aspose.note import NodeType

Simboliskie nosaukumi mezglu tipiem dokumenta objektu modelī. Deklarēti API saderībai; netiek izmantoti publiskajā API mezglu identifikācijai versijā v26.3.1 (izmantojiet isinstance pārbaudes vai GetChildNodes(Type) tā vietā).

ImageRenderOptionsString vērtībaAtbilstošā klase
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

ImageRenderOptions

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")

Vēlamā mezgla identifikācija: Praktiskā lietā izmantojiet isinstance(node, RichText) vai page.GetChildNodes(RichText) nevis NodeType salīdzinājumi.


Skatīt arī

 Latviešu