Aspose.Note FOSS for Python
Táto referencia pokrýva kompletný verejný povrch API verzie aspose-note 26.3.1. Iba symboly exportované z aspose.note balíka sú dokumentované tu. Čokoľvek pod aspose.note._internal je detail implementácie a môže sa zmeniť bez upozornenia.
ImageRenderOptions: pip install aspose-note (core) alebo pip install "aspose-note[pdf]" (s exportom PDF)
ImageRenderOptions: from aspose.note import Document, RichText, ...
ImageRenderOptions
Dokument a prechádzanie
| 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. |
Štruktúra dokumentu
| 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
Kompatibilné stuby
Detaily triedy
ImageRenderOptions
Koreňová trieda dokumentu. Načítajte .one súbor z cesty k súboru, a pathlib.Path, alebo binárny prúd.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Parametre konštruktora:
ImageRenderOptions:
ImageRenderOptions:
Document.FileFormat poznámka: Vlastnosť poskytuje najlepšiu snahu o určenie verzie formátu súboru OneNote. The FileFormat enum má tri hodnoty: OneNote2010, OneNoteOnline, a OneNote2007.
Document.Save() podpora streamu: target môže byť binárny stream (io.BytesIO, súborový handle otvorený v binárnom režime zápisu, atď.). Toto je potvrdené testovacou sadou: doc.Save(io.BytesIO(), PdfSaveOptions(SaveFormat.Pdf)).
DocumentVisitor
Abstraktná základná trieda pre prechádzanie podľa vzoru návštevníka. Predefinujte metódy návštevy, ktoré potrebujete:
ImageRenderOptions
Základná trieda pre všetky uzly stromu dokumentu.
CompositeNode
ImageRenderOptions Node. Pridáva správu podriadených:
ImageRenderOptions
ImageRenderOptions CompositeNode. Predstavuje stránku OneNote.
ImageRenderOptions:
ImageRenderOptions
ImageRenderOptions CompositeNode. Uchováva blok názvu Page.
ImageRenderOptions
ImageRenderOptions CompositeNode. Pozíciový kontajner pre OutlineElement uzly.
OutlineElement
ImageRenderOptions CompositeNode. Listový kontajner, ktorý obsahuje obsahové uzly.
RichText
ImageRenderOptions CompositeNode. Blok štýlovaného textu.
ImageRenderOptions:
TextRun
ImageRenderOptions Node. Jeden formátovaný textový segment.
TextStyle
ImageRenderOptions Node. Vlastnosti formátovania na znak pre TextRun.
ImageRenderOptions
ImageRenderOptions CompositeNode. Vložený obrázok.
ImageRenderOptions:
AttachedFile
ImageRenderOptions CompositeNode. Vložená príloha súboru.
ImageRenderOptions
ImageRenderOptions CompositeNode. Tabuľka v rámci OutlineElementu.
TableRow
ImageRenderOptions CompositeNode. Riadok v rámci Table. Iterovať GetChildNodes(TableCell) na prístup k bunkám.
TableCell
ImageRenderOptions CompositeNode. Bunka v TableRow. Obsahuje RichText, Image, a ďalšie uzly obsahu.
NoteTag
ImageRenderOptions Node. Štítok OneNote pripojený k uzlu obsahu.
Poznámka k časovej značke: created a completed sú surové celočíselné časové značky parsované z binárneho formátu MS-ONE, nie datetime objekty.
Továrenské metódy:
NumberList
ImageRenderOptions Node. Metadáta číslovaného alebo odrážkového zoznamu na OutlineElement.
LoadOptions
SaveOptions
Základná trieda pre všetky možnosti ukladania. Povinný pozičný argument.
PdfSaveOptions
ImageRenderOptions SaveOptions. PDF‑špecifická konfigurácia exportu. Vytvorte pomocou PdfSaveOptions(SaveFormat.Pdf).
PageIndex / PageCount výhrada: Tieto polia sú deklarované na PdfSaveOptions pre kompatibilitu API, ale the Document.Save() implementácia vo verzii v26.3.1 nečítá ich ani ich neodovzdáva PDF exportéru. Všetky stránky sú vždy exportované.
Licencia a merané použitie
Exportované kompatibilné stuby pre zhodu tvaru API s Aspose.Note pre .NET. V tejto FOSS implementácii sú všetky metódy nečinné (no‑ops).
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-opNa použitie akejkoľvek funkcie Aspose.Note FOSS pre Python nie je potrebný licenčný kľúč.
ImageRenderOptions
Úplná referencia výčtu: ImageRenderOptions
SaveFormat
FileFormat
Hodnoty výčtu predstavujúce verziu formátu súboru OneNote. Document.FileFormat poskytuje najlepšiu možnú indikáciu.
HorizontalAlignment
NodeType
ImageRenderOptions
Úplná referencia výnimiek: ImageRenderOptions