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
| Properties | Properties | Properties | Properties |
|---|---|---|---|
DocumentPassword | `str | None` | None |
LoadHistory | bool | False | حقل توافق 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
| Properties | Properties | Properties |
|---|---|---|
SaveFormat | SaveFormat | تنسيق الإخراج المستهدف لـ Document.Save() |
لا تقم بإنشاء نسخة SaveOptions مباشرةً. استخدم أحد الفئات الفرعية المطبقة لها.
الفئة: PdfSaveOptions
Properties: aspose.note.saving Properties: from aspose.note.saving import PdfSaveOptions Properties: SaveOptions
تكوين تصدير خاص بـ PDF. هذه هي الفئة الوحيدة لخيارات الحفظ التي يتم تمرير خياراتها إلى المُصدِّر الأساسي في الإصدار v26.3.1.
أنشئ باستخدام PdfSaveOptions() — لا يتطلب أي وسائط.
Properties
| Properties | Properties | Properties | تم تمريره إلى المُصدِّر | Properties |
|---|---|---|---|---|
SaveFormat | SaveFormat | SaveFormat.Pdf | — | يجب أن يكون SaveFormat.Pdf |
PageIndex | int | 0 | Properties | مُعلن للتوافق مع API؛ لا تأثير له في الإصدار v26.3.1 |
PageCount | `int | None` | None | Properties |
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.Pdf | PdfSaveOptions | نعم — يتطلب pip install "aspose-note[pdf]" |
SaveFormat.One | — | لا — يرفع UnsupportedSaveFormatException |
انظر أيضًا
- Properties:
Document.Save()يقبل هذه الخيارات - SaveFormat: تعداد صيغ الإخراج المدعومة
- UnsupportedSaveFormatException: يُرفع لل صيغ غير المنفذة
- دليل المطور لتصدير PDF