# OneNotePackageReader

Reads a complete offline OneNote notebook from a Cabinet-based .onepkg archive.

Class 

`OfficeIMO.OneNote`

**Namespace**

`OfficeIMO.OneNote`

**Assembly**

`OfficeIMO.OneNote`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OneNotePackageReader.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Reading/OneNotePackageReader.cs#L7)

**Modifiers**

static

Reads a complete offline OneNote notebook from a Cabinet-based .onepkg archive.

## Inheritance

- object
- OneNotePackageReader

## 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.

Filter members 

Show inherited

## Methods

Read 2 overloads

`public static OneNoteNotebook Read(string packagePath, OneNoteNotebookReaderOptions? options = null)` [#](#method-read-string-officeimo-onenote-onenotenotebookreaderoptions)

[OneNotePackageReader.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Reading/OneNotePackageReader.cs#L7)

Reads a .onepkg archive from a file path.

Parameters

**packagePath string required**

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

Returns

`OneNoteNotebook`

`public static OneNoteNotebook Read(Stream packageStream, string sourceName = "notebook.onepkg", OneNoteNotebookReaderOptions? options = null)` [#](#method-read-io-stream-string-officeimo-onenote-onenotenotebookreaderoptions)

[OneNotePackageReader.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Reading/OneNotePackageReader.cs#L22)

Reads a .onepkg archive from a caller-owned seekable stream.

Parameters

**packageStream System.IO.Stream required**

**sourceName string = "notebook.onepkg" optional**

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

Returns

`OneNoteNotebook`

## 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?`

<!-- PowerForge markdown artifact sha256:9B4DA96C326D0948B46E70C666A16F0F5A9497B619CFB3B05DC2D5E8FB693160 -->
