Aspose.Note FOSS for Python
Ta referencja obejmuje pełny publiczny interfejs API aspose-note wersja 26.3.1. Tylko symbole eksportowane z aspose.note pakietu są dokumentowane tutaj. Wszystko pod aspose.note._internal jest szczegółem implementacji i może ulec zmianie bez powiadomienia.
ImageRenderOptions: pip install aspose-note (core) lub pip install "aspose-note[pdf]" (z eksportem PDF)
ImageRenderOptions: from aspose.note import Document, RichText, ...
ImageRenderOptions
Dokument i przeglądanie
| 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. |
Struktura dokumentu
| 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
Stuby zgodności
Szczegóły klasy
ImageRenderOptions
Klasa dokumentu głównego. Wczytaj .one plik z ścieżki pliku, a pathlib.Path, lub strumień binarny.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Parametry konstruktora:
ImageRenderOptions:
ImageRenderOptions:
Document.FileFormat uwaga: Właściwość zapewnia przybliżone wskazanie wersji formatu pliku OneNote. Ta FileFormat enum ma trzy wartości: OneNote2010, OneNoteOnline, i OneNote2007.
Document.Save() obsługa strumieni: target może być strumieniem binarnym (io.BytesIO, uchwyt pliku otwarty w trybie binarnego zapisu, itp.). To jest potwierdzone przez zestaw testów: doc.Save(io.BytesIO(), PdfSaveOptions(SaveFormat.Pdf)).
DocumentVisitor
Abstrakcyjna klasa bazowa dla przeglądania w stylu wzorca odwiedzającego. Nadpisz potrzebne metody odwiedzające:
ImageRenderOptions
Klasa bazowa dla wszystkich węzłów drzewa dokumentu.
CompositeNode
ImageRenderOptions Node. Dodaje zarządzanie dziećmi:
ImageRenderOptions
ImageRenderOptions CompositeNode. Reprezentuje stronę OneNote.
ImageRenderOptions:
ImageRenderOptions
ImageRenderOptions CompositeNode. Przechowuje blok tytułu a Page.
ImageRenderOptions
ImageRenderOptions CompositeNode. Kontener pozycjonujący dla OutlineElement węzły.
OutlineElement
ImageRenderOptions CompositeNode. Kontener liściowy, który przechowuje węzły treści.
RichText
ImageRenderOptions CompositeNode. Blok sformatowanego tekstu.
ImageRenderOptions:
TextRun
ImageRenderOptions Node. Pojedynczy sformatowany segment tekstu.
TextStyle
ImageRenderOptions Node. Właściwości formatowania dla każdego znaku TextRun.
ImageRenderOptions
ImageRenderOptions CompositeNode. Osadzony obraz.
ImageRenderOptions:
AttachedFile
ImageRenderOptions CompositeNode. Osadzony załącznik pliku.
ImageRenderOptions
ImageRenderOptions CompositeNode. Tabela w obrębie OutlineElement.
TableRow
ImageRenderOptions CompositeNode. Wiersz w Table. Iteruj GetChildNodes(TableCell) aby uzyskać dostęp do komórek.
TableCell
ImageRenderOptions CompositeNode. Komórka w TableRow. Zawiera RichText, Image, oraz inne węzły treści.
NoteTag
ImageRenderOptions Node. Tag OneNote dołączony do węzła treści.
Uwaga o znaczniku czasu: created i completed są surowymi znacznikami czasu w postaci liczb całkowitych, odczytanymi z binarnego formatu MS-ONE, nie datetime obiekty.
Metody fabryczne:
NumberList
ImageRenderOptions Node. Metadane list numerowanych lub wypunktowanych na OutlineElement.
LoadOptions
SaveOptions
Klasa bazowa dla wszystkich opcji zapisu. Wymagany argument pozycyjny.
PdfSaveOptions
ImageRenderOptions SaveOptions. Konfiguracja eksportu specyficzna dla PDF. Tworzyć z PdfSaveOptions(SaveFormat.Pdf).
PageIndex / PageCount uwaga: Te pola są zadeklarowane w PdfSaveOptions dla zgodności API, ale Document.Save() implementacja w wersji v26.3.1 nie odczytuje ich ani nie przekazuje do eksportera PDF. Wszystkie strony są zawsze eksportowane.
Licencja i rozliczanie
Stuby kompatybilności eksportowane w celu zachowania kształtu API z Aspose.Note dla .NET. Wszystkie metody są operacjami bez efektu w tej implementacji 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-opNie jest wymagany klucz licencyjny, aby korzystać z dowolnej funkcji Aspose.Note FOSS dla Python.
ImageRenderOptions
Pełna referencja wyliczenia: ImageRenderOptions
SaveFormat
FileFormat
Wartości wyliczenia reprezentujące wersję formatu pliku OneNote. Document.FileFormat zapewnia wskazówkę w miarę możliwości.
HorizontalAlignment
NodeType
ImageRenderOptions
Pełna referencja wyjątków: ImageRenderOptions