Load / Save Options — Aspose.Note FOSS for Python API Reference

الفئة: LoadOptions

Properties: aspose.note Properties: from aspose.note import LoadOptions

LoadOptions يتم تمريره إلى Document منشئ للتحكم في كيفية .one يتم تحميل ملف.

Document(source="file.one", load_options=LoadOptions())

Properties

PropertiesPropertiesPropertiesProperties
DocumentPassword`strNone`None
LoadHistoryboolFalseحقل توافق API؛ غير مستخدم وظيفيًا في v26.3.1.

Properties

from aspose.note import Document, LoadOptions

opts = LoadOptions()
opts.LoadHistory = False  # no-op in v26.3.1, kept for .NET API compatibility

doc = Document("MyNotes.one", opts)

الفئة: SaveOptions (الفئة الأساسية)

Properties: aspose.note.saving Properties: from aspose.note.saving import PdfSaveOptions

SaveOptions هو الفئة الأساسية المجردة لجميع خيارات الحفظ. يتطلب SaveFormat كأول معامل موضعي لها.

Properties

PropertiesPropertiesProperties
SaveFormatSaveFormatتنسيق الإخراج المستهدف لـ Document.Save()

لا تقم بإنشاء نسخة SaveOptions مباشرةً. استخدم أحد الفئات الفرعية المطبقة لها.


الفئة: PdfSaveOptions

Properties: aspose.note.saving Properties: from aspose.note.saving import PdfSaveOptions Properties: SaveOptions

تكوين تصدير خاص بـ PDF. هذه هي الفئة الوحيدة لخيارات الحفظ التي يتم تمرير خياراتها إلى المُصدِّر الأساسي في الإصدار v26.3.1.

أنشئ باستخدام PdfSaveOptions() — لا يتطلب أي وسائط.

Properties

PropertiesPropertiesPropertiesتم تمريره إلى المُصدِّرProperties
SaveFormatSaveFormatSaveFormat.Pdfيجب أن يكون SaveFormat.Pdf
PageIndexint0Propertiesمُعلن للتوافق مع API؛ لا تأثير له في الإصدار v26.3.1
PageCount`intNone`NoneProperties

PageIndex / PageCount تحذير: هذه الحقول موجودة في الـ dataclass لكنها غير مقروءة بواسطة Document.Save() في الإصدار v26.3.1. جميع الصفحات تُصدَّر دائمًا إلى PDF بغض النظر عن هذه القيم.

Properties

from aspose.note import Document, SaveFormat
from aspose.note.saving import PdfSaveOptions

doc = Document("MyNotes.one")

##Basic PDF export
doc.Save("output.pdf", SaveFormat.Pdf)

##Using PdfSaveOptions
opts = PdfSaveOptions()
doc.Save("output.pdf", opts)
import io
from aspose.note import Document, SaveFormat
from aspose.note.saving import PdfSaveOptions

##Export to an in-memory buffer
doc = Document("MyNotes.one")
buf = io.BytesIO()
opts = PdfSaveOptions()
doc.Save(buf, opts)
pdf_bytes = buf.getvalue()
print(f"PDF size: {len(pdf_bytes)} bytes")

ما هي صيغ الحفظ التي تم تنفيذها؟?

Propertiesفئة Optionsتم التنفيذ في v26.3.1
SaveFormat.PdfPdfSaveOptionsنعم — يتطلب pip install "aspose-note[pdf]"
SaveFormat.Oneلا — يرفع UnsupportedSaveFormatException

انظر أيضًا

 العربية