Enumerations — Aspose.Note FOSS for Python API Reference
Enumerations
Tüm enumlar doğrudan paketten ortaya çıkar. aspose.note paket:
from aspose.note import SaveFormat, FileFormat, HorizontalAlignment, NodeTypeTüm enum üyeleri standart Python enum.Enum örnekler.
SaveFormat
Enumerations: from aspose.note import SaveFormat
Geçirilen çıktı formatını belirtir Document.Save().
| Enumerations | String değeri | v26.3.1 sürümündeki durum |
|---|---|---|
SaveFormat.Pdf | "pdf" | Uygulandı — gerektirir pip install "aspose-note[pdf]" |
SaveFormat.One | "one" | Uygulanmadı — hata fırlatır UnsupportedSaveFormatException |
Enumerations
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
Enumerations: from aspose.note import FileFormat
OneNote dosya formatı sürümünü temsil eder. Tarafından kullanılır Document.FileFormat.
| Enumerations | String değeri | Enumerations |
|---|---|---|
FileFormat.OneNote2010 | "onenote2010" | Standart OneNote 2010 / Windows 10 için OneNote bölüm formatı |
FileFormat.OneNoteOnline | "onenoteonline" | OneNote Online formatı |
FileFormat.OneNote2007 | "onenote2007" | Eski OneNote 2007 formatı |
Document.FileFormat not: Bu Document.FileFormat özelliği, OneNote dosya formatı sürümünün en iyi çaba ile bir göstergesini sağlar.
Enumerations
from aspose.note import Document, FileFormat
doc = Document("MyNotes.one")
if doc.FileFormat == FileFormat.OneNote2010:
print("OneNote 2010 format")HorizontalAlignment
Enumerations: from aspose.note import HorizontalAlignment
Metin veya nesne yatay hizalaması. API uyumluluğu için tanımlanmıştır; v26.3.1’de şu anda herhangi bir düğüme uygulanmamaktadır.
| Enumerations | Dize değeri |
|---|---|
HorizontalAlignment.Left | "left" |
HorizontalAlignment.Center | "center" |
HorizontalAlignment.Right | "right" |
Enumerations
from aspose.note import HorizontalAlignment
alignment = HorizontalAlignment.Left
print(alignment.value) # "left"NodeType
Enumerations: from aspose.note import NodeType
Belge nesne modelindeki düğüm tipleri için sembolik adlar. API uyumluluğu için bildirilmiştir; v26.3.1’de (kullan isinstance kontrolleri veya GetChildNodes(Type) bunun yerine).
| Enumerations | String değeri | İlgili sınıf |
|---|---|---|
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 |
Enumerations
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")Tercih edilen düğüm tanımlaması: Pratikte, kullanın isinstance(node, RichText) veya page.GetChildNodes(RichText) yerine NodeType karşılaştırmalar.
Ayrıca Bakınız
- Enumerations: açığa çıkarır
Document.FileFormat - LoadOptions: yükleme zamanı seçenekleri
- SaveOptions / PdfSaveOptions: kaydetme zamanı seçenekleri
- UnsupportedSaveFormatException: gerçekleştirilememiş için fırlatılır
SaveFormatdeğerler