Xamarin 表单:epubreader.cross 的问题 [英] Xamarin forms: Issue with epubreader.cross

查看:29
本文介绍了Xamarin 表单:epubreader.cross 的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 epubreader.cross NuGet 包来解析 .epub 文件.

I am using epubreader.cross NuGet package for parsing .epub files.

我的代码:

string fileName = "SampleEPUB.epub";
var assembly = typeof(MainPage).GetTypeInfo().Assembly;
Stream stream = assembly.GetManifestResourceStream($"{assembly.GetName().Name}.{fileName}");
EpubBook epubBook = EpubReader.ReadBook(stream);

对于某些 .epb 文件,我遇到以下例外情况:

For some .epb files I am getting below exceptions:

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 文件都可以使用 Adob​​e Digital Editions 4.5.11 查看.那么这个问题背后的原因是什么?

All my .epub files are able to view using Adobe Digital Editions 4.5.11. So what will be the reason behind this issue?

我在此处添加了一个示例项目,其中包含 .epub 文件以供参考.

I have added a sample project here having .epub files for the reference.

推荐答案

该项目似乎已被弃用.但是,看起来根存储库是活动的.您可以查看 github 项目站点.

That project seems to be deprecated. However , it looks like that the root repo is active though . You could check the github project site .

您需要从此链接手动下载dll文件 ,选择for .NET Standard 一项.然后将dll文件添加到forms工程中,右击Dependencies-Add project reference-Browse-选择下载文件

You need to download the dll file manually from this link , choose the for .NET Standard one . Then add the dll file into forms project , just right click Dependencies - Add project reference - Browse - Select the download file

这篇关于Xamarin 表单:epubreader.cross 的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆