Automatically pulls epub metadata out of epub files.
License
—
Deps
0
Install Size
—
Vulns
✓ 0
Published
Feb 28, 2026
$ dotnet add package QiwiTrails.EpubMetadataReaderA .NET Standard 2.0 library for reading metadata from EPUB files. EpubMetadataReader parses Open Publication Format (OPF) files contained within an EPUB and exposes all metadata, manifest, spine, and guide information through a simple API. Supports EPUB 2.0 and 3.0.
Install via NuGet:
dotnet add package QiwiTrails.EpubMetadataReader
using EpubMetadataReader;
Epub epub = new Epub("path/to/your/file.epub");
EpubBook book = epub.ReadEbook();
// Access metadata
string title = book.Metadata[0].Title[0];
string author = book.Metadata[0].Creators[0].Name;
string language = book.Metadata[0].Language[0];
string identifier = book.Metadata[0].Identifiers[0].UniqueID;
Epub epub = new Epub();
EpubBook book = epub.ReadEbook("path/to/your/file.epub");
Epub epub = new Epub("path/to/your/file.epub");
if (epub.Errors.Count > 0)
{
foreach (string error in epub.Errors)
{
Console.WriteLine(error);
}
}
Epub epub = new Epub("path/to/first.epub");
EpubBook firstBook = epub.ReadEbook();
epub.Reset();
EpubBook secondBook = epub.ReadEbook("path/to/second.epub");
| Property | Type | Description |
|---|---|---|
Book | EpubBook | The top-level container for all parsed data |
Book.Metadata | List<EpubBookMetadata> | Dublin Core metadata (title, authors, language, etc.) |
Book.Manifest | List<EpubBookManifest> | All content files referenced by the EPUB |
Book.Spine | List<EpubBookSpine> | Reading order of manifest items |
Book.Guide | List<EpubBookGuide> | Navigation references (cover, TOC, etc.) |
Book.Package | List<EpubBookPackage> | OPF package information and namespaces |
Errors | IReadOnlyList<string> |
| Any validation or parsing errors encountered |
| Field | Type | Notes |
|---|---|---|
Title | List<string> | Required by spec |
Language | List<string> | Required by spec |
Identifiers | List<Identifier> | Required by spec; includes ID, Scheme, and UniqueID |
Creators | List<Contributor> | Authors; includes Name, Role, and FileAs |
Contributors | List<Contributor> | Non-author contributors |
Dates | List<Date> | Publication dates with optional event type |
Publisher | List<string> | |
Description | List<string> | |
Subject | List<string> | |
Rights | List<string> | |
Type | List<string> | |
Format | List<string> | |
Source | List<string> | |
Relation | List<string> | |
Coverage | List<string> |
MIT � Damadar
Errors property exposing a read-only list of validation and parsing errors encountered during loadversion and unique-identifier are now validated as required package attributes; missing values are logged as errorsReset() fix: Error list is now cleared on resetEpubLocation is now correctly preserved when errors are logged during parsing