OfficeIMO.Reader.Epub
3.0.3
Prefix Reserved
dotnet add package OfficeIMO.Reader.Epub --version 3.0.3
NuGet\Install-Package OfficeIMO.Reader.Epub -Version 3.0.3
<PackageReference Include="OfficeIMO.Reader.Epub" Version="3.0.3" />
<PackageVersion Include="OfficeIMO.Reader.Epub" Version="3.0.3" />
<PackageReference Include="OfficeIMO.Reader.Epub" />
paket add OfficeIMO.Reader.Epub --version 3.0.3
#r "nuget: OfficeIMO.Reader.Epub, 3.0.3"
#:package OfficeIMO.Reader.Epub@3.0.3
#addin nuget:?package=OfficeIMO.Reader.Epub&version=3.0.3
#tool nuget:?package=OfficeIMO.Reader.Epub&version=3.0.3
OfficeIMO.Reader.Epub - EPUB reader adapter
OfficeIMO.Reader.Epub bridges OfficeIMO.Epub output into OfficeIMO.Reader.Core chunk contracts.
Install
dotnet add package OfficeIMO.Reader.Epub
Configure
using OfficeIMO.Epub;
using OfficeIMO.Reader;
using OfficeIMO.Reader.Epub;
OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
.AddEpubHandler(new EpubReadOptions {
PreferSpineOrder = true,
IncludeRawHtml = false,
MaxChapters = 100
})
.Build();
Examples
Read chapters as Reader chunks
using OfficeIMO.Reader;
using OfficeIMO.Reader.Epub;
OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
.AddEpubHandler()
.Build();
foreach (var chunk in reader.Read("book.epub", new ReaderOptions {
MaxChars = 6_000,
ComputeHashes = true
})) {
Console.WriteLine($"{chunk.Id}: {chunk.Location.Path}");
Console.WriteLine(chunk.Markdown ?? chunk.Text);
}
Read from a stream and surface warnings
using OfficeIMO.Epub;
using OfficeIMO.Reader;
using OfficeIMO.Reader.Epub;
OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
.AddEpubHandler(new EpubReadOptions {
FallbackToHtmlScan = true,
MaxChapterBytes = 2L * 1024L * 1024L
})
.Build();
await using var stream = File.OpenRead("upload.epub");
var chunks = reader.Read(stream, "upload.epub").ToList();
foreach (string warning in chunks.SelectMany(chunk => chunk.Warnings ?? Array.Empty<string>())) {
Console.WriteLine(warning);
}
Read chapters and packaged resources as one rich result
OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
.AddEpubHandler(new EpubReadOptions {
MaxResources = 500,
MaxResourceBytes = 4L * 1024L * 1024L,
MaxTotalResourceBytes = 32L * 1024L * 1024L
})
.Build();
OfficeDocumentReadResult document = reader.ReadDocument("book.epub");
foreach (OfficeDocumentPage chapter in document.Pages) {
Console.WriteLine($"{chapter.Number}. {chapter.Name}");
}
foreach (OfficeDocumentAsset asset in document.Assets) {
Console.WriteLine($"{asset.Kind}: {asset.FileName} ({asset.LengthBytes} bytes)");
}
The rich reader requests bounded chapter HTML and manifest payloads from OfficeIMO.Epub so it can reuse the HTML semantic mapping. Images, audio, video, fonts, stylesheets, scripts, media overlays, and other manifest resources are projected as assets; content documents and navigation files are not duplicated as assets. Remote resources retain metadata but are never fetched. Audio and video are exposed for downstream processing, not played or transcribed.
Manifest assets keep their package identity and payload while inheriting useful metadata from chapter placements, such as accessible image names, titles, and dimensions. The first available placement supplies missing metadata; each visual still retains its own placement content and source path.
What it emits
- Chapter-to-chunk projection.
- Max-character chunk splitting.
- Markdown and text chunk payloads.
- Warning chunks propagated from EPUB parser warnings.
- Virtual source paths such as
.epub::chapter.xhtmlfor traceability. - Path and stream dispatch, including non-seekable stream support.
- A schema-v5 rich result with chapter pages, HTML blocks, tables, links, forms, bounded manifest assets, metadata, and structured parser diagnostics.
- Chapter-relative, query-only, fragment-only, encoded, root-relative, external, and HTML-base URL projection through the shared EPUB reference contract.
- Structured chapter Markdown for native and ARIA headings, quotes, portable decimal ordered-list markers with preserved starts and value resets, code-language hints, tables, and local EPUB/DPUB-ARIA footnotes.
- Rich
quote,code, andfootnoteblocks, accessible link/image names, exact ordered-list markers, and propagatedofficeimo.html.*capabilities. - Recoverable diagnostics for unsafe or non-conforming chapter references.
Boundaries
- Reader adapter configuration belongs here.
- EPUB parsing belongs in
OfficeIMO.Epub. - Shared extraction contracts belong in
OfficeIMO.Reader.Core. - Local footnotes become typed Markdown footnotes. Cross-document note targets remain resolved EPUB links.
- Fixed-layout publications are identified and diagnosed; this reader extracts their content and resources but does not emulate a reading-system viewport.
- Unsupported encryption is reported as a security diagnostic and is not decrypted.
Targets and license
- Targets:
netstandard2.0,net8.0,net10.0. - License: MIT.
Dependency footprint
- External: None beyond the dependencies of its OfficeIMO format packages.
- OfficeIMO:
OfficeIMO.Reader.Core,OfficeIMO.Reader.Html, andOfficeIMO.Epub; EPUB parsing stays in the native package. - The EPUB semantics and resource projection layer adds no new package or process dependency.
See the complete OfficeIMO package map for related formats and conversion paths.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- OfficeIMO.Epub (>= 3.0.3)
- OfficeIMO.Reader.Core (>= 3.0.3)
- OfficeIMO.Reader.Html (>= 3.0.3)
-
.NETStandard 2.0
- OfficeIMO.Epub (>= 3.0.3)
- OfficeIMO.Reader.Core (>= 3.0.3)
- OfficeIMO.Reader.Html (>= 3.0.3)
-
net10.0
- OfficeIMO.Epub (>= 3.0.3)
- OfficeIMO.Reader.Core (>= 3.0.3)
- OfficeIMO.Reader.Html (>= 3.0.3)
-
net8.0
- OfficeIMO.Epub (>= 3.0.3)
- OfficeIMO.Reader.Core (>= 3.0.3)
- OfficeIMO.Reader.Html (>= 3.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OfficeIMO.Reader.Epub:
| Package | Downloads |
|---|---|
|
OfficeIMO.Reader.All
Composition-only preset for registering OfficeIMO.Reader's local format adapters. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.3 | 125 | 7/27/2026 |
| 3.0.2 | 124 | 7/26/2026 |
| 3.0.1 | 266 | 7/26/2026 |
| 3.0.0 | 435 | 7/20/2026 |
| 2.0.1 | 256 | 7/14/2026 |
| 2.0.0 | 95 | 7/14/2026 |
| 0.0.33 | 1,012 | 7/9/2026 |
| 0.0.32 | 265 | 7/8/2026 |
| 0.0.31 | 415 | 7/5/2026 |
| 0.0.30 | 189 | 7/4/2026 |
| 0.0.29 | 210 | 6/27/2026 |
| 0.0.28 | 108 | 6/27/2026 |
| 0.0.27 | 372 | 6/24/2026 |
| 0.0.26 | 160 | 6/23/2026 |
| 0.0.25 | 277 | 6/21/2026 |
| 0.0.24 | 115 | 6/16/2026 |
| 0.0.23 | 312 | 6/16/2026 |
| 0.0.22 | 151 | 6/15/2026 |
| 0.0.21 | 127 | 6/13/2026 |
| 0.0.20 | 111 | 6/12/2026 |