Aspose.Note FOSS for Python
Deze referentie behandelt de volledige publieke API-oppervlakte van aspose-note versie 26.3.1. Alleen symbolen die geëxporteerd zijn vanuit de aspose.note package worden hier gedocumenteerd. Alles onder aspose.note._internal is een implementatiedetail en kan zonder kennisgeving wijzigen.
ImageRenderOptions: pip install aspose-note (core) of pip install "aspose-note[pdf]" (met PDF-export)
ImageRenderOptions: from aspose.note import Document, RichText, ...
ImageRenderOptions
Document en Traversal
| 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. |
Documentstructuur
| 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
Compatibiliteitsstubs
Klasse-details
ImageRenderOptions
De root‑documentklasse. Laad een .one bestand vanaf een bestandspad, een pathlib.Path, of een binaire stream.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Constructorparameters:
ImageRenderOptions:
ImageRenderOptions:
Document.FileFormat opmerking: De eigenschap geeft een indicatie, voor zover mogelijk, van de OneNote‑bestandsformaatversie. De FileFormat enum heeft drie waarden: OneNote2010, OneNoteOnline, en OneNote2007.
Document.Save() streamondersteuning: target kan een binaire stream zijn (io.BytesIO, bestandshandle geopend in binaire schrijfmethode, enz.). Dit wordt bevestigd door de testsuite: doc.Save(io.BytesIO(), PdfSaveOptions(SaveFormat.Pdf)).
DocumentVisitor
Abstracte basisklasse voor visitor‑pattern traversals. Overschrijf de bezoek‑methoden die je nodig hebt:
ImageRenderOptions
Basisklasse voor alle documentboomknooppunten.
CompositeNode
ImageRenderOptions Node. Voegt kindbeheer toe:
ImageRenderOptions
ImageRenderOptions CompositeNode. Vertegenwoordigt een OneNote-pagina.
ImageRenderOptions:
ImageRenderOptions
ImageRenderOptions CompositeNode. Bevat het titelblok van een Page.
ImageRenderOptions
ImageRenderOptions CompositeNode. Een positionele container voor OutlineElement knooppunten.
OutlineElement
ImageRenderOptions CompositeNode. Een bladcontainer die inhoudsknooppunten bevat.
RichText
ImageRenderOptions CompositeNode. Een blok met opgemaakte tekst.
ImageRenderOptions:
TextRun
ImageRenderOptions Node. Een enkel opgemaakte tekstsegment.
TextStyle
ImageRenderOptions Node. Per-teken opmaak-eigenschappen voor een TextRun.
ImageRenderOptions
ImageRenderOptions CompositeNode. Een ingesloten afbeelding.
ImageRenderOptions:
AttachedFile
ImageRenderOptions CompositeNode. Een ingebedde bestandsbijlage.
ImageRenderOptions
ImageRenderOptions CompositeNode. Een tabel binnen een OutlineElement.
TableRow
ImageRenderOptions CompositeNode. Een rij binnen een Table. Itereren GetChildNodes(TableCell) om cellen te benaderen.
TableCell
ImageRenderOptions CompositeNode. Een cel binnen een TableRow. Bevat RichText, Image, en andere inhoudsknooppunten.
NoteTag
ImageRenderOptions Node. Een OneNote-tag gekoppeld aan een inhoudsknooppunt.
Tijdstempelnotitie: created en completed zijn ruwe integer‑tijdstempels zoals geparseerd uit het MS-ONE‑binaire formaat, niet datetime objecten.
Factory‑methoden:
NumberList
ImageRenderOptions Node. Genummerde of opsommingstekenlijstmetadata op een OutlineElement.
LoadOptions
SaveOptions
Basisklasse voor alle opslaan‑opties. Vereist positioneel argument.
PdfSaveOptions
ImageRenderOptions SaveOptions. PDF-specifieke exportconfiguratie. Opbouwen met PdfSaveOptions(SaveFormat.Pdf).
PageIndex / PageCount voorbehoud: Deze velden zijn gedeclareerd op PdfSaveOptions voor API-compatibiliteit, maar de Document.Save() implementatie in v26.3.1 leest ze niet en stuurt ze niet door naar de PDF-exporteur. Alle pagina’s worden altijd geëxporteerd.
Licentie en Metered
Compatibiliteits‑stubs geëxporteerd voor API‑vormcompatibiliteit met Aspose.Note voor .NET. Alle methoden zijn no‑ops in deze FOSS‑implementatie.
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-opEr is geen licentiesleutel vereist om enige functie van Aspose.Note FOSS voor Python te gebruiken.
ImageRenderOptions
Volledige enumeratie‑referentie: ImageRenderOptions
SaveFormat
FileFormat
Enum-waarden die de OneNote‑bestandsindelingsversie vertegenwoordigen. Document.FileFormat biedt een best‑effort indicatie.
HorizontalAlignment
NodeType
ImageRenderOptions
Volledige exceptiereferentie: ImageRenderOptions