Xamarin.forms Xamarin表单:与epubreader.cross一起发布

Xamarin.forms Xamarin表单:与epubreader.cross一起发布,xamarin.forms,epub,Xamarin.forms,Epub,我正在使用NuGet包解析.epub文件 我的代码: string fileName = "SampleEPUB.epub"; var assembly = typeof(MainPage).GetTypeInfo().Assembly; Stream stream = assembly.GetManifestResourceStream($"{assembly.GetName().Name}.{fileName}"); EpubBook epubBook

我正在使用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)'
所有my.epub文件都可以使用Adobe Digital Edition 4.5.11进行查看。那么这个问题背后的原因是什么呢


我添加了一个带有.epub文件的示例项目作为参考。

该项目似乎已被弃用。然而,看起来根回购是活动的。你可以查一下电话号码


您需要从这里手动下载dll文件,请为.NET标准选择
。然后将dll文件添加到表单项目中,只需右键单击
依赖项-添加项目引用-浏览-选择下载文件

您链接到的项目已3年未更新,并在其自述中包含此注释-“该项目已弃用”,或者您可以先在服务器中将epub转换为pdf。您是否检查了Cole提供的演示?您可以将问题发布到。在Github上发布问题。我接受你的回答,如果你找到更好的解决办法,请告诉我。感谢您的支持。Github对此问题不予置评。有更好的解决办法吗?是否有其他NuGet包用于解析epub文件?不过,我也有同样的问题。