Aspose.Note FOSS for Python
Denne referansen dekker det komplette offentlige API-området til aspose-note versjon 26.3.1. Kun symboler eksportert fra den aspose.note pakken er dokumentert her. Alt under aspose.note._internal er en implementasjonsdetalj og kan endres uten varsel.
ImageRenderOptions: pip install aspose-note (core) eller pip install "aspose-note[pdf]" (med PDF-eksport)
ImageRenderOptions: from aspose.note import Document, RichText, ...
ImageRenderOptions
Dokument og Traversering
| 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. |
Dokumentstruktur
| 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
Kompatibilitetsstubber
Klasse detaljer
ImageRenderOptions
Rotdokumentklassen. Last inn en .one fil fra en filsti, en pathlib.Path, eller en binær strøm.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Konstruktørparametere:
ImageRenderOptions:
ImageRenderOptions:
Document.FileFormat notat: Egenskapen gir en best‑effort‑indikasjon av OneNote‑filformatversjonen. Den FileFormat enum har tre verdier: OneNote2010, OneNoteOnline, og OneNote2007.
Document.Save() strømmestøtte: target kan være en binær strøm (io.BytesIO, filhåndtak åpnet i binær skrivetilstand, osv.). Dette er bekreftet av testsettet: doc.Save(io.BytesIO(), PdfSaveOptions(SaveFormat.Pdf)).
DocumentVisitor
Abstrakt baseklasse for traversering med visitor-mønster. Overstyr de besøksmetodene du trenger:
ImageRenderOptions
Basisklasse for alle dokumenttre-noder.
CompositeNode
ImageRenderOptions Node. Legger til håndtering av barn:
ImageRenderOptions
ImageRenderOptions CompositeNode. Representerer en OneNote-side.
ImageRenderOptions:
ImageRenderOptions
ImageRenderOptions CompositeNode. Inneholder tittelblokken til en Page.
ImageRenderOptions
ImageRenderOptions CompositeNode. En posisjonsbeholder for OutlineElement noder.
OutlineElement
ImageRenderOptions CompositeNode. En bladbeholder som inneholder innholdsnoder.
RichText
ImageRenderOptions CompositeNode. En blokk med formatert tekst.
ImageRenderOptions:
TextRun
ImageRenderOptions Node. Et enkelt formatert tekstsegment.
TextStyle
ImageRenderOptions Node. Per-tegn formateringsegenskaper for en TextRun.
ImageRenderOptions
ImageRenderOptions CompositeNode. Et innebygd bilde.
ImageRenderOptions:
AttachedFile
ImageRenderOptions CompositeNode. En innebygd filvedlegg.
ImageRenderOptions
ImageRenderOptions CompositeNode. En tabell innenfor et OutlineElement.
TableRow
ImageRenderOptions CompositeNode. En rad innenfor en Table. Iterer GetChildNodes(TableCell) for å få tilgang til celler.
TableCell
ImageRenderOptions CompositeNode. En celle innenfor en TableRow. Inneholder RichText, Image, og andre innholdsnoder.
NoteTag
ImageRenderOptions Node. En OneNote‑tagg festet til en innholdsnod.
Tidsstempelnote: created og completed er rå heltalls‑tidsstempler som er tolket fra MS-ONE‑binærformatet, ikke datetime objekter.
Fabrikkmetoder:
NumberList
ImageRenderOptions Node. Nummerert eller punktliste metadata på en OutlineElement.
LoadOptions
SaveOptions
Basisklasse for alle lagringsalternativer. Påkrevd posisjonelt argument.
PdfSaveOptions
ImageRenderOptions SaveOptions. PDF-spesifikk eksportkonfigurasjon. Konstruer med PdfSaveOptions(SaveFormat.Pdf).
PageIndex / PageCount forbehold: Disse feltene er deklarert på PdfSaveOptions for API-kompatibilitet, men the Document.Save() implementeringen i v26.3.1 leser dem ikke eller videresender dem til PDF-eksportøren. Alle sider blir alltid eksportert.
Lisens og Metered
Kompatibilitets‑stubber eksportert for API‑form‑kompatibilitet med Aspose.Note for .NET. Alle metoder er ingen‑operasjoner i denne FOSS‑implementasjonen.
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-opIngen lisensnøkkel kreves for å bruke noen funksjon i Aspose.Note FOSS for Python.
ImageRenderOptions
Fullstendig oppregningsreferanse: ImageRenderOptions
SaveFormat
FileFormat
Enum-verdier som representerer OneNote-filformatversjonen. Document.FileFormat gir en best mulig indikasjon.
HorizontalAlignment
NodeType
ImageRenderOptions
Fullstendig unntaksreferanse: ImageRenderOptions