【发布时间】:2020-07-11 05:54:56
【问题描述】:
我正在使用epubreader.cross NuGet 包来解析 .epub 文件。
我的代码:
string fileName = "SampleEPUB.epub";
var assembly = typeof(MainPage).GetTypeInfo().Assembly;
Stream stream = assembly.GetManifestResourceStream($"{assembly.GetName().Name}.{fileName}");
EpubBook epubBook = EpubReader.ReadBook(stream);
对于某些 .epb 文件,我遇到以下异常:
System.AggregateException: 'One or more errors occurred. (Incorrect EPUB navigation page target: normal is incorrect value for page target type.)'
System.AggregateException: 'One or more errors occurred. (Incorrect EPUB spine: TOC is missing)'
我的所有 .epub 文件都可以使用 Adobe Digital Editions 4.5.11 查看。那么这个问题背后的原因是什么?
我添加了一个示例项目here,其中包含 .epub 文件以供参考。
【问题讨论】:
-
您链接的项目 3 年内未更新,并在其 README 中包含此说明 - “该项目已弃用”
标签: xamarin.forms epub