Aspose.Note FOSS for Python
Tham chiếu này bao phủ toàn bộ bề mặt API công cộng của aspose-note phiên bản 26.3.1. Chỉ các ký hiệu được xuất ra từ aspose.note gói được tài liệu hoá ở đây. Bất kỳ thứ gì dưới aspose.note._internal là chi tiết triển khai và có thể thay đổi mà không thông báo.
Enumerations: pip install aspose-note (core) hoặc pip install "aspose-note[pdf]" (với xuất PDF)
Enumerations: from aspose.note import Document, RichText, ...
Enumerations
Tài liệu và Duyệt
| Class | Description |
|---|---|
AsposeNoteError | Class extending Exception. |
AttachedFile | AttachedFile.FileName holds the optional name of the attached file. |
CompositeNode | CompositeNode.AppendChildLast appends the given node as the last child and returns the added node. |
Document | Document.Save writes the document to a file, stream, or path using the given format or options. |
DocumentVisitor | DocumentVisitor.VisitDocumentStart is invoked when traversal begins a Document node. |
FileCorruptedException | Class extending AsposeNoteError. |
Image | Image.Replace replaces the current image data with the provided Image instance. |
IncorrectDocumentStructureException | Class extending AsposeNoteError. |
IncorrectPasswordException | Class extending AsposeNoteError. |
License | License.SetLicense loads a license from the given file path or binary stream. |
LoadOptions | LoadOptions.DocumentPassword holds the password used to open encrypted documents, or None if not set. |
Metered | Metered.SetMeteredKey stores the provided public and private keys for metered licensing. |
Node | Node.Accept invokes the visitor on this node for traversal or processing. |
NoteTag | NoteTag.CreateYellowStar creates a yellow‑star tag, optionally assigning a label. |
NumberList | NumberList.GetNumberedListHeader returns the header string for the specified list number. |
Outline | Outline.HorizontalOffset represents the horizontal offset of the outline within its container. |
OutlineElement | OutlineElement.NumberList represents the numbered list applied to this outline element, or None if absent. |
Page | Page.Clone creates a copy of the page; if cloneHistory is true the page’s revision history is also copied. |
PageHistory | PageHistory.Add adds the specified Page to the collection. |
ParagraphStyle | ParagraphStyle.Default returns a ParagraphStyle instance initialized with default formatting values. |
RichText | RichText.Append appends the given text with optional style to the end of the rich text. |
Table | Table.Tags provides the collection of NoteTag objects attached to the table. |
TableCell | Class with 7 methods and 4 properties. |
TableColumn | TableColumn.Width represents the column width in points, or None if not set. |
TableRow | Class with 7 methods and 4 properties. |
TextRun | TextRun.Text holds the plain string content of the text run. |
TextStyle | TextStyle.Default returns a TextStyle object representing the library’s default text formatting. |
Title | Title.TitleText holds the RichText representing the title’s main text, or None if absent. |
UnsupportedFileFormatException | UnsupportedFileFormatException.FileFormat represents the file format that triggered the exception. |
UnsupportedSaveFormatException | Class extending AsposeNoteError. |
Cấu trúc Tài liệu
| Enumeration | Description |
|---|---|
FileFormat | FileFormat.Unknown represents an unspecified or unrecognized file format. |
HorizontalAlignment | HorizontalAlignment.Left represents left horizontal alignment. |
NodeType | NodeType.Document represents a OneNote document node, the root of the DOM hierarchy. |
SaveFormat | SaveFormat.Pdf represents the PDF format used when saving a Document. |
TagStatus | TagStatus.Open represents an open (active) tag status. |
Enumerations
| Class | Description |
|---|---|
AttachmentTagFlowable | AttachmentTagFlowable.hAlign represents the horizontal alignment setting for the tag flowable. |
OutlinePrefixFlowable | OutlinePrefixFlowable.wrap sets the flowable’s available width and height to aW and aH. |
PdfSaveOptions | PdfSaveOptions.ImageCompression controls the compression algorithm applied to images embedded in the PDF. |
SaveOptions | SaveOptions.SaveFormat specifies the output format for saving the document. |
Enumerations
Stub Tương thích
Chi tiết Lớp
Enumerations
Lớp tài liệu gốc. Tải một .one tệp từ đường dẫn tệp, một pathlib.Path, hoặc một luồng nhị phân.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Tham số khởi tạo:
Enumerations:
Enumerations:
Document.FileFormat ghi chú: Thuộc tính này cung cấp một chỉ báo nỗ lực tốt nhất về phiên bản định dạng tệp OneNote. Thuộc tính FileFormat enum có ba giá trị: OneNote2010, OneNoteOnline, và OneNote2007.
Document.Save() hỗ trợ stream: target có thể là một luồng nhị phân (io.BytesIO, tay cầm tệp được mở ở chế độ ghi nhị phân, v.v.). Điều này được xác nhận bởi bộ kiểm thử: doc.Save(io.BytesIO(), PdfSaveOptions(SaveFormat.Pdf)).
DocumentVisitor
Lớp cơ sở trừu tượng cho việc duyệt theo mẫu visitor. Ghi đè các phương thức visit mà bạn cần:
Enumerations
Lớp cơ sở cho tất cả các nút cây tài liệu.
CompositeNode
Enumerations Node. Thêm quản lý con:
Enumerations
Enumerations CompositeNode. Đại diện cho một trang OneNote.
Enumerations:
Enumerations
Enumerations CompositeNode. Giữ khối tiêu đề của một Page.
Enumerations
Enumerations CompositeNode. Một container vị trí cho OutlineElement các nút.
OutlineElement
Enumerations CompositeNode. Một container lá chứa các nút nội dung.
RichText
Enumerations CompositeNode. Một khối văn bản có kiểu dáng.
Enumerations:
TextRun
Enumerations Node. Một đoạn văn bản định dạng đơn.
TextStyle
Enumerations Node. Thuộc tính định dạng theo ký tự cho một TextRun.
Enumerations
Enumerations CompositeNode. Một hình ảnh được nhúng.
Enumerations:
AttachedFile
Enumerations CompositeNode. Một tệp đính kèm nhúng.
Enumerations
Enumerations CompositeNode. Một bảng trong OutlineElement.
TableRow
Enumerations CompositeNode. Một hàng trong một Table. Lặp lại GetChildNodes(TableCell) để truy cập các ô.
TableCell
Enumerations CompositeNode. Một ô trong một TableRow. Chứa RichText, Image, và các nút nội dung khác.
NoteTag
Enumerations Node. Một thẻ OneNote được gắn vào một nút nội dung.
Ghi chú thời gian: created và completed là các dấu thời gian nguyên thô được phân tích từ định dạng nhị phân MS-ONE, không datetime đối tượng.
Phương thức tạo:
NumberList
Enumerations Node. Siêu dữ liệu danh sách có số hoặc dấu đầu dòng trên một OutlineElement.
LoadOptions
SaveOptions
Lớp cơ sở cho tất cả các tùy chọn lưu. Đối số vị trí bắt buộc.
PdfSaveOptions
Enumerations SaveOptions. Cấu hình xuất đặc thù cho PDF. Tạo bằng PdfSaveOptions(SaveFormat.Pdf).
PageIndex / PageCount cảnh báo: Các trường này được khai báo trên PdfSaveOptions để tương thích API, nhưng Document.Save() cài đặt trong v26.3.1 không đọc hoặc chuyển tiếp chúng tới bộ xuất PDF. Tất cả các trang luôn được xuất.
Giấy phép và Định mức
Các stub tương thích được xuất để duy trì hình dạng API với Aspose.Note cho .NET. Tất cả các phương thức đều không thực hiện gì trong triển khai FOSS này.
from aspose.note import License, Metered
lic = License()
lic.SetLicense("path/to/license.lic") # no-op
m = Metered()
m.SetMeteredKey("public_key", "private_key") # no-opKhông cần khóa giấy phép để sử dụng bất kỳ tính năng nào của Aspose.Note FOSS cho Python.
Enumerations
Tham chiếu liệt kê đầy đủ: Enumerations
SaveFormat
FileFormat
Các giá trị enum đại diện cho phiên bản định dạng tệp OneNote. Document.FileFormat cung cấp một chỉ báo nỗ lực tốt nhất.
HorizontalAlignment
NodeType
Enumerations
Tham chiếu đầy đủ cho ngoại lệ: Enumerations