# OneNoteNotebook

A OneNote notebook with ordered section groups and sections.

Class 

`OfficeIMO.OneNote`

**Namespace**

`OfficeIMO.OneNote`

**Assembly**

`OfficeIMO.OneNote`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OneNoteNotebook.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L8)

**Modifiers**

sealed

A OneNote notebook with ordered section groups and sections.

## Inheritance

- object
- OneNoteNotebook

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Read and Write OneNote Notebooks](/docs/onenote/notebooks/) Guide
  
  Open OneNote notebooks from a folder, a .onetoc2 file or a .onepkg export, walk section groups and sections, and write notebooks offline.
- [Convert OneNote to PDF, HTML, Markdown and Images](/docs/onenote/export-and-convert/) Guide
  
  Convert OneNote sections and notebooks to PDF, HTML or Markdown, render pages to PNG, TIFF or SVG images, and extract chunks for search, all offline.

## Usage

Explore 17 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Method [OneNoteNotebookReader.Read](/api/onenote/officeimo-onenote-onenotenotebookreader/#method-read-string-officeimo-onenote-onenotenotebookreaderoptions)
- Method [OneNotePackageReader.Read](/api/onenote/officeimo-onenote-onenotepackagereader/#method-read-string-officeimo-onenote-onenotenotebookreaderoptions)

### Accepted by parameters 15

- Method [OneNoteFileExtractor.Extract](/api/onenote/officeimo-onenote-onenotefileextractor/#method-extract-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotefileextractionoptions-threading-cancellationtoken) parameter `notebook`
- Method [OneNoteImageExportExtensions.SaveAsImages](/api/onenote/officeimo-onenote-onenoteimageexportextensions/#method-saveasimages-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Method [OneNoteImageExportExtensions.SaveAsImagesAsync](/api/onenote/officeimo-onenote-onenoteimageexportextensions/#method-saveasimagesasync-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Method [OneNoteImageExportExtensions.ToImages](/api/onenote/officeimo-onenote-onenoteimageexportextensions/#method-toimages-officeimo-onenote-onenotenotebook-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Method [OneNoteImageExportExtensions.ToImages](/api/onenote/officeimo-onenote-onenoteimageexportextensions/#method-toimages-officeimo-onenote-onenotenotebook-officeimo-drawing-officeimageexportformat-officeimo-onenote-onenotepagebatchrenderingoptions) parameter `notebook`
- Method [OneNoteImageExportExtensions.ToImagesAsync](/api/onenote/officeimo-onenote-onenoteimageexportextensions/#method-toimagesasync-officeimo-onenote-onenotenotebook-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Extension method [OneNoteNotebook.SaveAsImages](/api/onenote/officeimo-onenote-onenotenotebook/#extension-saveasimages-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Extension method [OneNoteNotebook.SaveAsImagesAsync](/api/onenote/officeimo-onenote-onenotenotebook/#extension-saveasimagesasync-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Extension method [OneNoteNotebook.ToImages](/api/onenote/officeimo-onenote-onenotenotebook/#extension-toimages-officeimo-onenote-onenotenotebook-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Extension method [OneNoteNotebook.ToImages](/api/onenote/officeimo-onenote-onenotenotebook/#extension-toimages-officeimo-onenote-onenotenotebook-officeimo-drawing-officeimageexportformat-officeimo-onenote-onenotepagebatchrenderingoptions) parameter `notebook`
- Extension method [OneNoteNotebook.ToImagesAsync](/api/onenote/officeimo-onenote-onenotenotebook/#extension-toimagesasync-officeimo-onenote-onenotenotebook-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken) parameter `document`
- Method [OneNoteNotebookWriter.Write](/api/onenote/officeimo-onenote-onenotenotebookwriter/#method-write-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotesaveoptions) parameter `notebook`
- Method [OneNotePackageWriter.Write](/api/onenote/officeimo-onenote-onenotepackagewriter/#method-write-officeimo-onenote-onenotenotebook-officeimo-onenote-onenotesaveoptions) parameter `notebook`
- Method [OneNotePageTraversal.Flatten](/api/onenote/officeimo-onenote-onenotepagetraversal/#method-flatten-officeimo-onenote-onenotenotebook-int32) parameter `notebook`
- Method [OneNoteTableOfContentsWriter.Write](/api/onenote/officeimo-onenote-onenotetableofcontentswriter/#method-write-officeimo-onenote-onenotenotebook-io-stream-officeimo-onenote-onenotesaveoptions) parameter `notebook`

Filter members 

Show inherited

## Constructors

`public OneNoteNotebook()` [#](#constructor-ctor)

[OneNoteNotebook.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L8)

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public bool IsContentComplete { get; private set; }` [#](#property-iscontentcomplete)

[OneNoteNotebook.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L14)

Whether the notebook was created in memory or its source hierarchy and section contents were loaded. Metadata-only reads, unread source members, and excluded source groups make this false.

`public Guid? Id { get; set; }` [#](#property-id)

[OneNoteNotebook.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L23)

Notebook identity when available. Serialization assigns and retains an identity for a new notebook.

`public string Name { get; set; }` [#](#property-name)

[OneNoteNotebook.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L26)

Notebook display name.

`public string? SourcePath { get; set; }` [#](#property-sourcepath)

[OneNoteNotebook.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L29)

Source folder or package path.

`public OneNoteStorageFormat TableOfContentsStorageFormat { get; internal set; }` [#](#property-tableofcontentsstorageformat)

[OneNoteNotebook.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L32)

Physical encoding of the loaded root .onetoc2, or unknown for a new notebook.

`public uint? ColorArgb { get; set; }` [#](#property-colorargb)

[OneNoteNotebook.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L35)

Notebook color encoded as ARGB, when present.

`public bool? HistoryEnabled { get; set; }` [#](#property-historyenabled)

[OneNoteNotebook.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L38)

Whether the notebook enables version history.

`public IList<OneNoteSectionGroup> SectionGroups { get; }` [#](#property-sectiongroups)

[OneNoteNotebook.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L41)

Top-level section groups in notebook order.

`public IList<OneNoteSection> Sections { get; }` [#](#property-sections)

[OneNoteNotebook.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L44)

Top-level sections in notebook order.

`public IList<OneNoteOpaqueObject> UnknownObjects { get; }` [#](#property-unknownobjects)

[OneNoteNotebook.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L47)

Opaque notebook objects preserved for loss-aware writing.

`public IList<OneNoteDiagnostic> Diagnostics { get; }` [#](#property-diagnostics)

[OneNoteNotebook.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Model/OneNoteNotebook.cs#L50)

Diagnostics produced while loading the notebook.

## Extension Methods

`public static OfficeConversionReport SaveAsImages(OneNoteNotebook document, string folderPath, OneNotePageBatchRenderingOptions? options = null, CancellationToken cancellationToken = default)` [#](#extension-saveasimages-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken)

[OneNoteNotebook.ImageBatchConversion.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Imaging/OneNoteNotebook.ImageBatchConversion.cs#L24)

Saves selected images without retaining payloads and returns aggregate conversion evidence.

Parameters

**document OfficeIMO.OneNote.OneNoteNotebook required**

**folderPath string required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`OfficeConversionReport`

`public static async Task<OfficeConversionReport> SaveAsImagesAsync(OneNoteNotebook document, string folderPath, OneNotePageBatchRenderingOptions? options = null, CancellationToken cancellationToken = default)` [#](#extension-saveasimagesasync-officeimo-onenote-onenotenotebook-string-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken)

Asynchronously saves selected images, retaining paths and evidence rather than encoded payloads.

Parameters

**document OfficeIMO.OneNote.OneNoteNotebook required**

**folderPath string required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OfficeConversionReport>`

ToImages 3 overloads

`public static IReadOnlyList<OfficeImageExportResult> ToImages(OneNoteNotebook notebook, OfficeImageExportFormat format, OneNotePageBatchRenderingOptions? options = null)` [#](#extension-toimages-officeimo-onenote-onenotenotebook-officeimo-drawing-officeimageexportformat-officeimo-onenote-onenotepagebatchrenderingoptions)

[OneNoteImageExportExtensions.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Imaging/OneNoteImageExportExtensions.cs#L34)

Exports selected notebook pages using the shared five-format result contract.

Parameters

**notebook OfficeIMO.OneNote.OneNoteNotebook required**

**format OfficeIMO.Drawing.OfficeImageExportFormat required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

Returns

`IReadOnlyList<OfficeImageExportResult>`

`public static IReadOnlyList<OfficeImageExportResult> ToImages(OneNoteNotebook document, OneNotePageBatchRenderingOptions? options = null, CancellationToken cancellationToken = default)` [#](#extension-toimages-officeimo-onenote-onenotenotebook-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken)

[OneNoteNotebook.ImageBatchConversion.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Imaging/OneNoteNotebook.ImageBatchConversion.cs#L10)

Renders a batch using the encoding and selection in the options.

Parameters

**document OfficeIMO.OneNote.OneNoteNotebook required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`IReadOnlyList<OfficeImageExportResult>`

`public static void ToImages(OneNoteNotebook document, OfficeImageExportFormat format, OfficeImageExportConsumer consumer, OneNotePageBatchRenderingOptions? options = null, CancellationToken cancellationToken = default)` [#](#member-dffb6d5066a825fcc86e4aab)

[OneNoteNotebook.ImageBatchConversion.cs:63](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Imaging/OneNoteNotebook.ImageBatchConversion.cs#L63)

Streams selected images under the shared deadline, admission and aggregate resource limits.

Parameters

**document OfficeIMO.OneNote.OneNoteNotebook required**

**format OfficeIMO.Drawing.OfficeImageExportFormat required**

**consumer OfficeIMO.Drawing.OfficeImageExportConsumer required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

ToImagesAsync 3 overloads

`public static Task<IReadOnlyList<OfficeImageExportResult>> ToImagesAsync(OneNoteNotebook document, OneNotePageBatchRenderingOptions? options = null, CancellationToken cancellationToken = default)` [#](#extension-toimagesasync-officeimo-onenote-onenotenotebook-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken)

[OneNoteNotebook.ImageBatchConversion.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Imaging/OneNoteNotebook.ImageBatchConversion.cs#L17)

Renders a batch asynchronously using the same options and evidence contract.

Parameters

**document OfficeIMO.OneNote.OneNoteNotebook required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<IReadOnlyList<OfficeImageExportResult>>`

`public static Task<IReadOnlyList<OfficeImageExportResult>> ToImagesAsync(OneNoteNotebook document, OfficeImageExportFormat format, OneNotePageBatchRenderingOptions? options = null, CancellationToken cancellationToken = default)` [#](#extension-toimagesasync-officeimo-onenote-onenotenotebook-officeimo-drawing-officeimageexportformat-officeimo-onenote-onenotepagebatchrenderingoptions-threading-cancellationtoken)

[OneNoteNotebook.ImageBatchConversion.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Imaging/OneNoteNotebook.ImageBatchConversion.cs#L47)

Asynchronously exports selected images through the shared bounded streaming bridge.

Parameters

**document OfficeIMO.OneNote.OneNoteNotebook required**

**format OfficeIMO.Drawing.OfficeImageExportFormat required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<IReadOnlyList<OfficeImageExportResult>>`

`public static Task ToImagesAsync(OneNoteNotebook document, OfficeImageExportFormat format, OfficeImageExportAsyncConsumer consumer, OneNotePageBatchRenderingOptions? options = null, CancellationToken cancellationToken = default)` [#](#member-a856ee0a4c869d9df2dbce74)

[OneNoteNotebook.ImageBatchConversion.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Imaging/OneNoteNotebook.ImageBatchConversion.cs#L55)

Asynchronously delivers selected images with backpressure and cooperative cancellation.

Parameters

**document OfficeIMO.OneNote.OneNoteNotebook required**

**format OfficeIMO.Drawing.OfficeImageExportFormat required**

**consumer OfficeIMO.Drawing.OfficeImageExportAsyncConsumer required**

**options OfficeIMO.OneNote.OneNotePageBatchRenderingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task`

<!-- PowerForge markdown artifact sha256:2917265F6F45A83A26DD1E108C28508EF1D33BB17F590EDE82A5EFD5B2EAACB8 -->
