Aspose.Note FOSS for Python

Denne reference dækker hele den offentlige API-overflade for aspose-note Kun symboler, der eksporteres fra EU-landene. aspose.note - Alt, hvad der er under pakken, er dokumenteret her. aspose.note._internal er en gennemførelsesdetalje og kan ændres uden varsel.

Import: from aspose.note import Document, RichText, ...

Import af varer: from aspose.note import Document, RichText, ...


Klasse:

Install: pip install aspose-note (core) or pip install "aspose-note[pdf]" (with PDF export)

Dokument og gennemgang

ClassDescription
AsposeNoteErrorClass extending Exception.
AttachedFileAttachedFile.FileName holds the optional name of the attached file.
CompositeNodeCompositeNode.AppendChildLast appends the given node as the last child and returns the added node.
DocumentDocument.Save writes the document to a file, stream, or path using the given format or options.
DocumentVisitorDocumentVisitor.VisitDocumentStart is invoked when traversal begins a Document node.
FileCorruptedExceptionClass extending AsposeNoteError.
ImageImage.Replace replaces the current image data with the provided Image instance.
IncorrectDocumentStructureExceptionClass extending AsposeNoteError.
IncorrectPasswordExceptionClass extending AsposeNoteError.
LicenseLicense.SetLicense loads a license from the given file path or binary stream.
LoadOptionsLoadOptions.DocumentPassword holds the password used to open encrypted documents, or None if not set.
MeteredMetered.SetMeteredKey stores the provided public and private keys for metered licensing.
NodeNode.Accept invokes the visitor on this node for traversal or processing.
NoteTagNoteTag.CreateYellowStar creates a yellow‑star tag, optionally assigning a label.
NumberListNumberList.GetNumberedListHeader returns the header string for the specified list number.
OutlineOutline.HorizontalOffset represents the horizontal offset of the outline within its container.
OutlineElementOutlineElement.NumberList represents the numbered list applied to this outline element, or None if absent.
PagePage.Clone creates a copy of the page; if cloneHistory is true the page’s revision history is also copied.
PageHistoryPageHistory.Add adds the specified Page to the collection.
ParagraphStyleParagraphStyle.Default returns a ParagraphStyle instance initialized with default formatting values.
RichTextRichText.Append appends the given text with optional style to the end of the rich text.
TableTable.Tags provides the collection of NoteTag objects attached to the table.
TableCellClass with 7 methods and 4 properties.
TableColumnTableColumn.Width represents the column width in points, or None if not set.
TableRowClass with 7 methods and 4 properties.
TextRunTextRun.Text holds the plain string content of the text run.
TextStyleTextStyle.Default returns a TextStyle object representing the library’s default text formatting.
TitleTitle.TitleText holds the RichText representing the title’s main text, or None if absent.
UnsupportedFileFormatExceptionUnsupportedFileFormatException.FileFormat represents the file format that triggered the exception.
UnsupportedSaveFormatExceptionClass extending AsposeNoteError.

Dokumentstruktur

EnumerationDescription
FileFormatFileFormat.Unknown represents an unspecified or unrecognized file format.
HorizontalAlignmentHorizontalAlignment.Left represents left horizontal alignment.
NodeTypeNodeType.Document represents a OneNote document node, the root of the DOM hierarchy.
SaveFormatSaveFormat.Pdf represents the PDF format used when saving a Document.
TagStatusTagStatus.Open represents an open (active) tag status.

Indholdet af dette dokument

ClassDescription
AttachmentTagFlowableAttachmentTagFlowable.hAlign represents the horizontal alignment setting for the tag flowable.
OutlinePrefixFlowableOutlinePrefixFlowable.wrap sets the flowable’s available width and height to aW and aH.
PdfSaveOptionsPdfSaveOptions.ImageCompression controls the compression algorithm applied to images embedded in the PDF.
SaveOptionsSaveOptions.SaveFormat specifies the output format for saving the document.

Valgmuligheder

Kompatibilitetstubber


Klasseoplysninger

Dokumentet

Klassen for roddokumentet. Lade en .one fil fra en filvej, a pathlib.Path,eller en binær strøm.

from aspose.note import Document, LoadOptions

doc = Document(source=None, load_options=None)

Konstruktorparametre:

Egenskaber:

Metoder til at anvende:

Document.FileFormat bemærkning:: Ejendommen giver en best-effort indikation af filformatsversionen OneNote. FileFormat enum har tre værdier: OneNote2010, OneNoteOnline, og OneNote2007.

Document.Save() Støtte til strømning: target kan være en binær strøm (io.BytesIO, filhåndtag åbnet i binær skrivetilstand osv.).


DocumentVisitor

Abstrakt basisklasse til besøgsmønster-overgange. Overskrive de besøgsmethoder, du har brug for:


Knudepunkt

Basisklasse for alle dokumenttrænoder.


CompositeNode

Udvidelse Node.Føjelse af børneforvaltning:


Siderne

Udvidelse CompositeNode. Repræsenterede en OneNote side.

Metoder til at anvende:


Udtrykket “indhold”

Udvidelse CompositeNode.Den har titlen på en af de to europæiske lande. Page.


Udkast til udtalelse

Udvidelse CompositeNode.En positionel beholder til OutlineElement - Knuder.


OutlineElement

Udvidelse CompositeNode.En bladbeholder, der indeholder indholdsnoder.


RichText

Udvidelse Node.En blok af stiliseret tekst.

Metoder til at anvende:


TextRun

Et enkelt formateret tekstsegment inden for RichText.TextRuns.


TextStyle

Propertierne for formatering pr. tegn til en TextRun.


Billed:

Udvidelse CompositeNode.- Et indlejret billede.

Metoder til at anvende:


AttachedFile

Udvidelse Node.- En indlejret fil vedhæftet.


Tabel 1 - Indtægter

Udvidelse CompositeNode.En tabel i en OutlineElement.


TableRow

Udvidelse CompositeNode.En række inden for en Table.Itereret GetChildNodes(TableCell) til at få adgang til celler.


TableCell

Udvidelse CompositeNode.En celle inden for en TableRow. indeholder: RichText, Image, og andre indholdsknode.


NoteTag

Et OneNote-tag, der er knyttet til en indholdsknode.

Fabrikmetoder:


NumberList

Metadata fra en nummereret eller med kugler markeret liste på et OutlineElement.


LoadOptions


SaveOptions

Basisklasse for opsparing.


PdfSaveOptions

Udvidelse SaveOptions. PDF-specifik eksportkonfiguration. Konstruer med PdfSaveOptions() (alle argumenter er kun søgeord med standardindstillinger).

PageIndex / PageCount Forsigtighed::Disse felter angives på: PdfSaveOptions for API-kompatibilitet, men den Document.Save() Implementeringen i v26.3.1 gælder ikke eller videresender dem til PDF-eksporteren. Alle sider eksporteres altid.


Licens og måling

Kompatibilitetstubs eksporteret til API-formkompatibiliteten med Aspose.Note for .NET. Alle metoder er no-ops i denne FOSS implementering.

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-op

Der kræves ingen licensnøgle for at bruge nogen funktion i Aspose.Note FOSS til Python.


Oplysninger om optegnelser

Fuldt opgørelsesreference: Oplysninger om optegnelser

SaveFormat

FileFormat

Enum-værdier, der repræsenterer versionen af filformatet OneNote. Document.FileFormat giver en indikation af best effort.

HorizontalAlignment

NodeType


Undtagelser

Fuld reference: Undtagelser


Se også:

 Dansk