Aspose.Note FOSS for Python
Această referință acoperă suprafața completă a API-ului public al aspose-note versiunii 26.3.1. Doar simbolurile exportate din aspose.note pachet sunt documentate aici. Orice aflat sub aspose.note._internal este un detaliu de implementare și poate fi modificat fără notificare.
ImageRenderOptions: pip install aspose-note (core) sau pip install "aspose-note[pdf]" (cu export PDF)
ImageRenderOptions: from aspose.note import Document, RichText, ...
ImageRenderOptions
Document și Traversare
| 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. |
Structura Documentului
| 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. |
ImageRenderOptions
| 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. |
ImageRenderOptions
Stub-uri de Compatibilitate
Detalii de Clasă
ImageRenderOptions
Clasa documentului rădăcină. Încarcă un .one fișier dintr-o cale de fișier, un pathlib.Path, sau un flux binar.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Parametrii constructorului:
ImageRenderOptions:
ImageRenderOptions:
Document.FileFormat notă: Proprietatea oferă o indicație de bună credință a versiunii formatului de fișier OneNote. The FileFormat enum are trei valori: OneNote2010, OneNoteOnline, și OneNote2007.
Document.Save() suport pentru flux: target poate fi un flux binar (io.BytesIO, descriptor de fișier deschis în modul de scriere binar, etc.). Acest lucru este confirmat de suita de teste: doc.Save(io.BytesIO(), PdfSaveOptions(SaveFormat.Pdf)).
DocumentVisitor
Clasă de bază abstractă pentru traversarea prin modelul vizitatorului. Suprascrie metodele de vizitare de care ai nevoie:
ImageRenderOptions
Clasă de bază pentru toate nodurile arborelui de documente.
CompositeNode
ImageRenderOptions Node. Adaugă gestionarea copiilor:
ImageRenderOptions
ImageRenderOptions CompositeNode. Reprezintă o pagină OneNote.
ImageRenderOptions:
ImageRenderOptions
ImageRenderOptions CompositeNode. Conține blocul de titlu al unui Page.
ImageRenderOptions
ImageRenderOptions CompositeNode. Un container pozițional pentru OutlineElement noduri.
OutlineElement
ImageRenderOptions CompositeNode. Un container frunză care conține noduri de conținut.
RichText
ImageRenderOptions CompositeNode. Un bloc de text stilizat.
ImageRenderOptions:
TextRun
ImageRenderOptions Node. Un segment de text formatat unic.
TextStyle
ImageRenderOptions Node. Proprietăți de formatare per caracter pentru un TextRun.
ImageRenderOptions
ImageRenderOptions CompositeNode. O imagine încorporată.
ImageRenderOptions:
AttachedFile
ImageRenderOptions CompositeNode. O atașare de fișier încorporată.
ImageRenderOptions
ImageRenderOptions CompositeNode. Un tabel în interiorul unui OutlineElement.
TableRow
ImageRenderOptions CompositeNode. Un rând într-un Table. Iterați GetChildNodes(TableCell) pentru a accesa celulele.
TableCell
ImageRenderOptions CompositeNode. O celulă într-un TableRow. Conține RichText, Image, și alte noduri de conținut.
NoteTag
ImageRenderOptions Node. O etichetă OneNote atașată unui nod de conținut.
Notă de timestamp: created și completed sunt timestamp-uri brute ca numere întregi, parsate din formatul binar MS-ONE, nu datetime obiecte.
Metode de fabrică:
NumberList
ImageRenderOptions Node. Metadatele listelor numerotate sau cu marcatori pe un OutlineElement.
LoadOptions
SaveOptions
Clasă de bază pentru toate opțiunile de salvare. Argument pozițional obligatoriu.
PdfSaveOptions
ImageRenderOptions SaveOptions. Configurație de export specifică PDF. Construiți cu PdfSaveOptions(SaveFormat.Pdf).
PageIndex / PageCount avertisment: Aceste câmpuri sunt declarate pe PdfSaveOptions pentru compatibilitate API, dar Document.Save() implementarea în v26.3.1 nu le citește sau le transmite exportatorului PDF. Toate paginile sunt întotdeauna exportate.
Licență și tarifare pe bază de consum
Stub-uri de compatibilitate exportate pentru compatibilitatea formei API cu Aspose.Note pentru .NET. Toate metodele sunt fără efect în această implementare FOSS.
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-opNu este necesară nicio cheie de licență pentru a utiliza orice funcționalitate a Aspose.Note FOSS pentru Python.
ImageRenderOptions
Referință completă a enumerării: ImageRenderOptions
SaveFormat
FileFormat
Valorile enum care reprezintă versiunea formatului de fișier OneNote. Document.FileFormat furnizează o indicație de tip best‑effort.
HorizontalAlignment
NodeType
ImageRenderOptions
Referință completă a excepțiilor: ImageRenderOptions