EPUB ingestion without a browser engine
OfficeIMO.Epub reads the EPUB container, OPF package, navigation, spine, chapters, and resource metadata. It returns deterministic, typed results for search, indexing, migration, and content analysis.
using OfficeIMO.Epub;
EpubDocument book = EpubDocument.Load("handbook.epub", new EpubReadOptions {
PreferSpineOrder = true,
MaxChapters = 100
});
foreach (EpubChapter chapter in book.Chapters) {
Console.WriteLine($"{chapter.Order}: {chapter.Title}");
Console.WriteLine(chapter.Text);
}
Useful for
- Building a searchable catalog from EPUB title, creator, language, navigation, and chapter text.
- Reading resource metadata without loading every payload into memory.
- Resolving chapter-relative references without network or filesystem access.
- Feeding EPUB into
OfficeIMO.Reader.Epubfor normalized chunks and rich extraction results. - Rendering EPUB content through focused HTML/Drawing adapters when a visual preview is needed.
The parser is read-only. It does not bypass DRM, execute scripts, perform browser layout, or mutate the package. See the EPUB extraction guide for bounded resource and Reader examples.