Enumerations — Aspose.Note FOSS for Python API Reference
ImageRenderOptions
Visų išvardijimų yra tiesiogiai prieinami iš aspose.note paketo:
from aspose.note import SaveFormat, FileFormat, HorizontalAlignment, NodeTypeVisi enum nariai yra standartiniai Python enum.Enum instancijos.
SaveFormat
ImageRenderOptions: from aspose.note import SaveFormat
Nurodo išvesties formatą, perduodamą į Document.Save().
| ImageRenderOptions | Eilutės reikšmė | Būsena v26.3.1 |
|---|---|---|
SaveFormat.Pdf | "pdf" | Įgyvendinta — reikalauja pip install "aspose-note[pdf]" |
SaveFormat.One | "one" | Neįgyvendinta — kelia 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
Atstovauja OneNote failo formato versiją. Naudojama Document.FileFormat.
| ImageRenderOptions | Eilutės reikšmė | ImageRenderOptions |
|---|---|---|
FileFormat.OneNote2010 | "onenote2010" | Standartinis OneNote 2010 / OneNote for Windows 10 sekcijos formatas |
FileFormat.OneNoteOnline | "onenoteonline" | OneNote Online formatas |
FileFormat.OneNote2007 | "onenote2007" | Senosios kartos OneNote 2007 formatas |
Document.FileFormat pastaba: Ši Document.FileFormat savybė suteikia geriausiai įmanomą OneNote failo formato versijos indikaciją.
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
Teksto arba objekto horizontalus lygiavimas. Deklaruota API suderinamumui; šiuo metu nenaudojama jokiam mazgui v26.3.1.
| ImageRenderOptions | Eilutės reikšmė |
|---|---|
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
Simboliniai pavadinimai mazgo tipams dokumentų objektų modelyje. Deklaruoti API suderinamumui; nenaudojami viešojo API mazgų identifikavimui v26.3.1 (naudokite isinstance patikrinimus arba GetChildNodes(Type) vietoj).
| ImageRenderOptions | Eilutės reikšmė | Atitinkama klasė |
|---|---|---|
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")Pageidaujamas mazgo identifikavimas: Praktikoje naudokite isinstance(node, RichText) arba page.GetChildNodes(RichText) užuot NodeType palyginimus.
Žr. taip pat
- ImageRenderOptions: atskleidžia
Document.FileFormat - LoadOptions: įkėlimo laiko parinktys
- SaveOptions / PdfSaveOptions: išsaugojimo laiko parinktys
- UnsupportedSaveFormatException: iškeliamas neįgyvendintam
SaveFormatreikšmės