Enumerations

Enumerations — Aspose.Note FOSS for Python API Reference

ImageRenderOptions

Alla uppräkningar exponeras direkt från aspose.note paketet:

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

Alla enum-medlemmar är standard Python enum.Enum instanser.


SaveFormat

ImageRenderOptions: from aspose.note import SaveFormat

Anger det utdataformat som skickas till Document.Save().

ImageRenderOptionsSträngvärdeStatus i v26.3.1
SaveFormat.Pdf"pdf"Implementerad — kräver pip install "aspose-note[pdf]"
SaveFormat.One"one"Ej implementerad — kastar 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

Representerar OneNote-filformatets version. Används av Document.FileFormat.

ImageRenderOptionsSträngvärdeImageRenderOptions
FileFormat.OneNote2010"onenote2010"Standard OneNote 2010 / OneNote för Windows 10 sektionformat
FileFormat.OneNoteOnline"onenoteonline"OneNote Online-format
FileFormat.OneNote2007"onenote2007"Äldre OneNote 2007-format

Document.FileFormat anteckning: Den Document.FileFormat egenskapen ger en bästa möjliga indikation av OneNote-filformatets version.

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

Horisontell justering för text eller objekt. Deklarerad för API-kompatibilitet; tillämpas för närvarande inte på någon nod i v26.3.1.

ImageRenderOptionsSträngvärde
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

Symboliska namn för nodtyperna i dokumentobjektmodellen. Deklarerade för API‑kompatibilitet; används inte av det offentliga API:et för nodidentifiering i v26.3.1 (använd isinstance kontroller eller GetChildNodes(Type) istället).

ImageRenderOptionsSträngvärdeMotsvarande klass
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")

Föredragen nodidentifiering: I praktiken, använd isinstance(node, RichText) eller page.GetChildNodes(RichText) hellre än NodeType jämförelser.


Se även

 Svenska