Aspose.Note FOSS for Python
Questa referenza copre l’intera superficie dell’API pubblica di aspose-note versione 26.3.1. Solo i simboli esportati dal aspose.note pacchetto sono documentati qui. Qualsiasi cosa sotto aspose.note._internal è un dettaglio di implementazione e può cambiare senza preavviso.
ImageRenderOptions: pip install aspose-note (core) o pip install "aspose-note[pdf]" (con esportazione PDF)
ImageRenderOptions: from aspose.note import Document, RichText, ...
ImageRenderOptions
Documento e 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. |
Struttura del documento
| 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
Stub di compatibilità
Dettagli della classe
ImageRenderOptions
La classe documento radice. Carica un .one file da un percorso, un pathlib.Path, o un flusso binario.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Parametri del costruttore:
ImageRenderOptions:
ImageRenderOptions:
Document.FileFormat nota: La proprietà fornisce un’indicazione di massima della versione del formato file OneNote. Il FileFormat l’enum ha tre valori: OneNote2010, OneNoteOnline, e OneNote2007.
Document.Save() supporto stream: target può essere un flusso binario (io.BytesIO, handle di file aperto in modalità scrittura binaria, ecc.). Questo è confermato dalla suite di test: doc.Save(io.BytesIO(), PdfSaveOptions(SaveFormat.Pdf)).
DocumentVisitor
Classe base astratta per il traversal con pattern visitor. Sovrascrivi i metodi visit di cui hai bisogno:
ImageRenderOptions
Classe base per tutti i nodi dell’albero del documento.
CompositeNode
ImageRenderOptions Node. Aggiunge la gestione dei figli:
ImageRenderOptions
ImageRenderOptions CompositeNode. Rappresenta una pagina OneNote.
ImageRenderOptions:
ImageRenderOptions
ImageRenderOptions CompositeNode. Contiene il blocco titolo di una Page.
ImageRenderOptions
ImageRenderOptions CompositeNode. Un contenitore posizionale per OutlineElement nodi.
OutlineElement
ImageRenderOptions CompositeNode. Un contenitore foglia che contiene nodi di contenuto.
RichText
ImageRenderOptions CompositeNode. Un blocco di testo formattato.
ImageRenderOptions:
TextRun
ImageRenderOptions Node. Un singolo segmento di testo formattato.
TextStyle
ImageRenderOptions Node. Proprietà di formattazione per carattere per un TextRun.
ImageRenderOptions
ImageRenderOptions CompositeNode. Un’immagine incorporata.
ImageRenderOptions:
AttachedFile
ImageRenderOptions CompositeNode. Un allegato di file incorporato.
ImageRenderOptions
ImageRenderOptions CompositeNode. Una tabella all’interno di un OutlineElement.
TableRow
ImageRenderOptions CompositeNode. Una riga all’interno di una Table. Itera GetChildNodes(TableCell) per accedere alle celle.
TableCell
ImageRenderOptions CompositeNode. Una cella all’interno di una TableRow. Contiene RichText, Image, e altri nodi di contenuto.
NoteTag
ImageRenderOptions Node. Un tag OneNote collegato a un nodo di contenuto.
Nota del timestamp: created e completed sono timestamp interi grezzi analizzati dal formato binario MS-ONE, non datetime oggetti.
Metodi di fabbrica:
NumberList
ImageRenderOptions Node. Metadati di elenco numerato o puntato su un OutlineElement.
LoadOptions
SaveOptions
Classe base per tutte le opzioni di salvataggio. Argomento posizionale obbligatorio.
PdfSaveOptions
ImageRenderOptions SaveOptions. Configurazione di esportazione specifica per PDF. Costruire con PdfSaveOptions(SaveFormat.Pdf).
PageIndex / PageCount avvertenza: Questi campi sono dichiarati su PdfSaveOptions per compatibilità API, ma il Document.Save() implementazione in v26.3.1 non legge né li inoltra all’esportatore PDF. Tutte le pagine vengono sempre esportate.
Licenza e a consumo
Stub di compatibilità esportati per la compatibilità della forma dell’API con Aspose.Note per .NET. Tutti i metodi sono no-op in questa implementazione FOSS.
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-opNon è necessaria alcuna chiave di licenza per utilizzare qualsiasi funzionalità di Aspose.Note FOSS per Python.
ImageRenderOptions
Riferimento completo dell’enumerazione: ImageRenderOptions
SaveFormat
FileFormat
Valori enum che rappresentano la versione del formato file OneNote. Document.FileFormat fornisce un’indicazione al meglio delle possibilità.
HorizontalAlignment
NodeType
ImageRenderOptions
Riferimento completo all’eccezione: ImageRenderOptions