Aspose.Note FOSS for Python
Tento odkaz pokrývá celou veřejnou plochu API pro: aspose-note Verze 26.3.1 Pouze symboly vyvážené z EU a ze zemí, které jsou součástí Evropské unie. aspose.note Vše, co je pod tímto kódem, se zde dokumentuje. aspose.note._internal je prováděcí podrobnost a může se bez předchozího oznámení změnit.
Import: from aspose.note import Document, RichText, ...
Dovoz: from aspose.note import Document, RichText, ...
Třídy
Install: pip install aspose-note (core) or pip install "aspose-note[pdf]" (with PDF export)
Dokumenty a průběh
| 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. |
Obsah:
| 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. |
Možnosti
Kompatibilní stuby
Podrobnosti o třídě
Dokumenty
Klasifikace základního dokumentu. .one soubor z cesty souboru, a pathlib.Path,nebo binární proud.
from aspose.note import Document, LoadOptions
doc = Document(source=None, load_options=None)Parametry konstruktoru:
Vlastnosti:
Metody:
Document.FileFormatpoznámka::Vlastnost poskytuje nejlepší indikátor verze formátu souboru OneNote .FileFormatenum má tři hodnoty:OneNote2010,OneNoteOnline,a)OneNote2007.
Document.Save()Podpora proudění:targetmůže být binární tok (io.BytesIO, souborová ruka otevřená v binárním režimu psaní atd.).
DocumentVisitor
Abstraktní základní třída pro průcházku vzorů návštěvníků. Přehlížet potřebné metody návštevy:
Vstupní uzel
Základní třída pro všechny uzly stromů dokumentů.
CompositeNode
Rozsah: Node.Přidává se:
Stránka
Rozsah: CompositeNode. Zobrazuje stránku OneNote.
Metody:
Název:
Rozsah: CompositeNode.- Je držitelem titulu . Page.
Přehled
Rozsah: CompositeNode.Postulatelný kontejner pro: OutlineElement uzly.
OutlineElement
Rozsah: CompositeNode.Obsahující obsahové uzly.
RichText
Rozsah: Node.- Blok stylizovaného textu.
Metody:
TextRun
Jediný formátovaný textový segment v rámci: RichText.TextRuns.
TextStyle
Vlastnosti formátování na znak pro: TextRun.
Obraz:
Rozsah: CompositeNode.Vložený obraz.
Metody:
AttachedFile
Rozsah: Node.- Vkládaný soubor.
Tabulka 1
Rozsah: CompositeNode.Tabela uvnitř OutlineElement.
TableRow
Rozsah: CompositeNode.Řádek v rámci řady . Table.- Iterativní. GetChildNodes(TableCell) k přístupu do buňky.
TableCell
Rozsah: CompositeNode. Buňka v rámci … TableRow.Obsahuje: RichText, Image, a další obsahové uzly.
NoteTag
Tyg OneNote připojený k obsahu.
Zpracovatelské metody:
NumberList
Metadata čísleného nebo sčítaného seznamu na OutlineElement.
LoadOptions
SaveOptions
Základní třída pro možnosti uložení. Požadovaný poziční argument.
PdfSaveOptions
Rozsah: SaveOptions. PDF-specifikní konfigurace vývozu. Konstruovat s PdfSaveOptions() (všechny argumenty jsou pouze klíčová slova s výchozími funkcemi).
PageIndex/PageCountvýstraha:Tato pole jsou vyjádřena na:PdfSaveOptionspro kompatibilitu s API, aleDocument.Save()Implementace v verzi 26.3.1 se nepoužije a není předávána vývozci PDF. Všechny stránky jsou vždy exportovány.
Licence a měření
Kompatibilita stubů exportované pro API tvar kompatibility s Aspose.Note pro .NET. Všechny metody jsou no-ops v této implementaci 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-opŽádný licenční klíč není potřebný k použití jakékoli funkce Aspose.Note FOSS pro Python.
Číslování
Úplný odkaz na vyčíslení: Číslování
SaveFormat
FileFormat
Věci, které představují verzi formátu souboru OneNote. Document.FileFormat poskytuje indikátor nejlepšího úsilí.
HorizontalAlignment
NodeType
Výjimky
Úplná výjimka: Výjimky