Frequently Asked Questions
Licensing & Open Source
What license does Aspose.Note FOSS for Python use?
Aspose.Note FOSS for Python is released under the MIT License. You may use, modify, and redistribute the library for any purpose — including commercial applications — without royalties or attribution requirements beyond including the license text.
Can I use this library in a commercial product?
Yes. The MIT License imposes no restrictions on commercial use, redistribution, or modification. There are no runtime fees, usage limits, or subscription requirements.
Where is the source code?
The package is published on PyPI as aspose-note. Install it with:
pip install aspose-note>=26.3.2Installation & Requirements
How do I install Aspose.Note FOSS for Python?
Install the package from PyPI using the pip command below — no system dependencies are required:
pip install aspose-note>=26.3.2Verify the installation by importing Document and printing a confirmation message:
from aspose.note import Document
print("aspose-note is ready.")What Python versions are supported?
Aspose.Note FOSS for Python requires Python 3.10 or later. It is pure Python with no compiled extensions, so it runs identically on Windows, macOS, Linux, Docker containers, and serverless functions.
Does it require Microsoft Office or Microsoft OneNote?
No. The library reads OneNote .one files and exports to PDF natively in Python. There is no
dependency on Microsoft Office, COM automation, or any Windows-specific API.
Format Support
Which OneNote formats can I read?
The library reads the three OneNote binary variants:
| Format | Extension | Read | Write |
|---|---|---|---|
| OneNote 2010 | .one | ✓ | — |
| OneNote 2007 | .one | ✓ | — |
| OneNote Online | .one | ✓ | — |
.pdf | — | ✓ |
Use the FileFormat property on a loaded Document to identify which variant was detected:
from aspose.note import Document
doc = Document("notebook.one")
print(doc.FileFormat) # e.g. FileFormat.OneNote2010Can I export OneNote documents to PDF?
Yes. Pass SaveFormat.Pdf as the second argument to Document.Save(). The example below exports a loaded OneNote document to a PDF file:
from aspose.note import Document, SaveFormat
doc = Document("notebook.one")
doc.Save("output.pdf", SaveFormat.Pdf)You can also save to an in-memory buffer by passing a BytesIO object instead of a file path.
Can I save back to the OneNote format?
No. The library reads .one files but only exports to PDF. Calling Document.Save() with a format other than PDF raises UnsupportedSaveFormatException. Use SaveFormat.Pdf for all save operations.
API Usage
How do I load a OneNote file?
Instantiate Document with the file path to load the full OneNote document tree into memory:
from aspose.note import Document
doc = Document("notebook.one")Document is the root of the object model. Every Page, Outline, and RichText node
in the file is accessible from this root.
How do I iterate over pages and their text content?
Use GetChildNodes() to retrieve typed child nodes at any level of the tree:
from aspose.note import Document, Page, RichText
doc = Document("notebook.one")
for page in doc.GetChildNodes(Page):
print(f"Page author: {page.Author}")
for rt in page.GetChildNodes(RichText):
text = "".join(rt)
if text.strip():
print(text)How do I build a document from scratch?
Construct nodes top-down and attach each one to its parent using AppendChildLast(), then call Document.Save() to write the result:
from aspose.note import Document, Page, Outline, RichText, TextStyle, Title, SaveFormat
doc = Document()
page = Page()
title_text = RichText()
title_text.Append("My Page Title", TextStyle())
title = Title()
title.TitleText = title_text
page.Title = title
outline = Outline()
page.AppendChildLast(outline)
doc.AppendChildLast(page)
doc.Save("new_notebook.pdf", SaveFormat.Pdf)How do I read page metadata such as author and creation time?
Each Page node exposes Author, CreationTime, and LastModifiedTime as properties.
The Title node provides TitleText, TitleDate, and TitleTime as RichText children:
from aspose.note import Document, Page
doc = Document("notebook.one")
for page in doc.GetChildNodes(Page):
print(f"Author : {page.Author}")
print(f"Created : {page.CreationTime}")
if page.Title and page.Title.TitleText:
print(f"Title : {page.Title.TitleText}")Known Limitations
Are there any known limitations I should be aware of?
The current release (26.3.2) focuses on reading OneNote .one files and exporting to PDF. The supported output format is PDF only. Raster and vector output (such as PNG, SVG, and HTML) falls outside the scope of this FOSS edition.
Can I control PDF export options such as page size or DPI?
Document.Save() with SaveFormat.Pdf is the standard way to export a OneNote document to PDF. Advanced save options are unavailable in the current API surface; the method produces a default rendering. If you need fine-grained output control, apply further adjustments to the resulting file using a dedicated PDF tool.
Are image dimensions available on image nodes?
Image nodes expose two pairs of dimension attributes. Width and Height are mutable attributes that you can read and assign. OriginalWidth and OriginalHeight are read-only properties that return the original image dimensions. All four return float | None.