Enumerations — Aspose.Note FOSS for Python API Reference
Properties
جميع التعدادات مكشوفة مباشرةً من aspose.note الحزمة:
from aspose.note import SaveFormat, FileFormat, HorizontalAlignment, NodeTypeجميع أعضاء التعداد هي قياسية Python enum.Enum نماذج.
SaveFormat
Properties: from aspose.note import SaveFormat
يشير إلى تنسيق الإخراج الممرَّر إلى Document.Save().
| Properties | قيمة نصية | الحالة في الإصدار v26.3.1 |
|---|---|---|
SaveFormat.Pdf | "pdf" | تم التنفيذ — يتطلب pip install "aspose-note[pdf]" |
SaveFormat.One | "one" | غير مُنفَّذ — يرفع 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
يمثل إصدار تنسيق ملف OneNote. يُستخدم بواسطة Document.FileFormat.
| Properties | قيمة نصية | Properties |
|---|---|---|
FileFormat.OneNote2010 | "onenote2010" | تنسيق قسم OneNote 2010 القياسي / OneNote لنظام Windows 10 |
FileFormat.OneNoteOnline | "onenoteonline" | تنسيق OneNote Online |
FileFormat.OneNote2007 | "onenote2007" | تنسيق OneNote 2007 القديم |
Document.FileFormat ملاحظة: الـ Document.FileFormat الخاصية توفر إشارة تقريبية لإصدار تنسيق ملف 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
محاذاة أفقية للنص أو الكائن. مُعلنة لتوافقية API؛ غير مطبَّقة حالياً على أي عقدة في الإصدار v26.3.1.
| Properties | قيمة نصية |
|---|---|
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
الأسماء الرمزية لأنواع العقد في نموذج كائن المستند. معلنة لتوافق API؛ غير مستخدمة من قبل API العامة لتحديد العقد في v26.3.1 (استخدم isinstance checks أو GetChildNodes(Type) بدلاً من ذلك).
| Properties | قيمة السلسلة | الفئة المقابلة |
|---|---|---|
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")التعريف المفضّل للعقدة: عمليًا، استخدم isinstance(node, RichText) أو page.GetChildNodes(RichText) بدلاً من NodeType المقارنات.
انظر أيضًا
- Properties: يكشف
Document.FileFormat - LoadOptions: خيارات وقت التحميل
- SaveOptions / PdfSaveOptions: خيارات وقت الحفظ
- UnsupportedSaveFormatException: يُرفع لغير المنفذ
SaveFormatالقيم