Aspose.Note FOSS for Python
Diese Referenz umfasst die gesamte öffentliche API-Oberfläche von: aspose-note Version 26.3.1 Nur Symbole, die aus dem Europäischen Union ausgeführt werden. aspose.note Die Daten sind hier dokumentiert. aspose.note._internal ist ein Durchführungsdetail und kann ohne vorherige Ankündigung geändert werden.
Import: from aspose.note import Document, RichText, ...
Einfuhr: from aspose.note import Document, RichText, ...
Klassen
Install: pip install aspose-note (core) or pip install "aspose-note[pdf]" (with PDF export)
Dokument und Durchlauf
| 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. |
Inhalt der Veranstaltung
| 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. |
Optionen
Kompatibilitäts-Stubbs
Klassendetails
Dokumenten und Informationen
Die Wurzel-Dokumentklasse. .one Datei aus einem Dateipfad, a pathlib.Path, oder binärer Strom.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Konstruktionsparameter:
Eigenschaften:
Methoden und Verfahren:
Document.FileFormatAnmerkung::Die Eigenschaft liefert eine Best-Ensay-Angabe der Version des Dateifformats OneNote.FileFormatenum hat drei Werte:OneNote2010,OneNoteOnline,und .OneNote2007.
Document.Save()Streaming-Unterstützung:targetkann ein binärer Strom sein (io.BytesIO, Datei-Handschrift im binären Schreibmodus geöffnet, etc.).
DocumentVisitor
Abstrakte Basisklasse für Besucher-Muster-Traversal. Überschreiben Sie die benötigten Besuchsmethoden:
Knoten
Basisklasse für alle Dokumentbaumknoten.
CompositeNode
Ausdehnung Node.Die Kinderbetreuung wird ergänzt durch:
Seite
Ausdehnung CompositeNode. Repräsentiert eine OneNote-Seite.
Methoden und Verfahren:
Titel der Verordnung (EG) Nr.
Ausdehnung CompositeNode.Die Kommission hat die Anmeldung der Page.
Umrisse
Ausdehnung CompositeNode.Ein Positionsbehälter für die OutlineElement Knoten.
OutlineElement
Ausdehnung CompositeNode.Ein Blattbehälter, der die Inhalte enthält.
RichText
Ausdehnung Node.Ein Block mit geschriebenem Text.
Methoden und Verfahren:
TextRun
Ein einzelnes formatiertes Textsegment innerhalb der RichText.TextRuns.
TextStyle
Die Eigenschaften der Pro-Charakter-Formatierung für eine TextRun.
Bild und Aufnahme:
Ausdehnung CompositeNode.Ein eingebettetes Bild.
Methoden und Verfahren:
AttachedFile
Ausdehnung Node.Ein eingebetteter Dateianhänger.
Tabelle 1 und 2
Ausdehnung CompositeNode.Eine Tabelle innerhalb eines OutlineElement.
TableRow
Ausdehnung CompositeNode.Eine Reihe innerhalb einer Table.Iteration GetChildNodes(TableCell) um auf Zellen zuzugreifen.
TableCell
Ausdehnung CompositeNode.Eine Zelle innerhalb einer TableRow. enthält RichText, Image, und andere Inhaltsknoten.
NoteTag
Ein Tag OneNote, das an einen Inhaltsknoten angebracht ist.
Betriebsverfahren:
NumberList
Metadaten der nummerierten oder mit Schaltfaden versehenen Listen auf einem OutlineElement.
LoadOptions
SaveOptions
Basisklasse für Speicheroptionen. Positionsargument erforderlich.
PdfSaveOptions
Ausdehnung SaveOptions. PDF-spezifische Exportkonfiguration. Konstruieren mit PdfSaveOptions() (alle Argumente sind nur für Stichwörter mit Standardvorgaben).
PageIndex/PageCountWarnung::Diese Felder werden auf:PdfSaveOptionsfür die API-Kompatibilität, aber derDocument.Save()Die Implementierung in v26.3.1 gilt nicht und wird dem PDF-Exporteur nicht weitergeleitet. Alle Seiten werden immer exportiert.
Lizenz und Meterung
Kompatibilitätsstubs für die API-Formkompatibilität mit Aspose.Note für .NET exportiert. Alle Methoden sind in dieser FOSS-Implementierung 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-opFür die Verwendung von Funktionen in Aspose.Note FOSS für Python ist kein Lizenzschlüssel erforderlich.
Aufzählungen
Vollständige Aufzählung: Aufzählungen
SaveFormat
FileFormat
Enum-Werte, die das Dateifortformat OneNote darstellen. Document.FileFormat eine Best-Effort-Indikation liefert.
HorizontalAlignment
NodeType
Ausnahmen
Vollständige Ausnahmeregelung: Ausnahmen