适用于 java 或 android 的 ePub 库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3645795/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 03:07:04  来源:igfitidea点击:

ePub library for java or android

javaandroidepublib

提问by Faren

Is there any library to read ePub format? I found ePublib in http://github.com/psiegman/epublib. I'm still learning how to use it.

是否有任何库可以读取 ePub 格式?我在http://github.com/psiegman/epublib 中找到了 ePublib 。我还在学习如何使用它。

Is there ePub jar which works for Android?

是否有适用于 Android 的 ePub jar?

采纳答案by P. Siegmann

I am the author of epublib. It now runs on Android. See http://www.siegmann.nl/epublib/android

我是 epublib 的作者。它现在可以在 Android 上运行。见http://www.siegmann.nl/epublib/android

回答by OBX

You can use Folio Readerfor this purpose. To use , add this to gradle:

为此,您可以使用Folio Reader。要使用 ,请将其添加到 gradle:

compile 'com.folioreader:folioreader:0.2.5'

And if you have the .epubfile in assets folder, you can load the file as :

如果您.epub在 assets 文件夹中有该文件,则可以将文件加载为:

Intent intent = new Intent(HomeActivity.this, FolioActivity.class);
intent.putExtra(FolioActivity.INTENT_EPUB_SOURCE_TYPE, FolioActivity.EpubSourceType.ASSESTS);
intent.putExtra(FolioActivity.INTENT_EPUB_SOURCE_PATH, "epub/The Silver Chair.epub");
startActivity(intent);

The library and sample is available[here].

库和示例可在[此处] 获得

The other available alternatives are:

其他可用的替代方案是:

回答by shaby

You can use one of the best epub sdk I found for epub, its also available for iOS ad desktop. Please check it here

您可以使用我为 epub 找到的最好的 epub sdk 之一,它也可用于 iOS 广告桌面。 请在这里检查

//Example for playingn epub from asset folder. ls.installBook("file://android_asset/books/epub_cgfirstwordsattheaquarium.epub");

//从资产文件夹播放epub的示例。ls.installBook("file://android_asset/books/epub_cgfirstwordsattheaquarium.epub");

//Example for playing epub fromm network. ls.startDownload("http://scs.skyepub.net/samples/Alice.epub","","Alice's Adventures","Lewis Carroll");

//从网络播放epub的示例。ls.startDownload(" http://scs.skyepub.net/samples/Alice.epub","","Alice's Adventures","刘易斯卡罗尔");

//ls is an object of LocalService class which extends Service class.Please check sdk for complete information.

//ls 是 LocalService 类的一个对象,它扩展了 Service 类。完整信息请查看 sdk。

Github link https://github.com/xunuosi/SkyEpubForAndroid

Github 链接 https://github.com/xunuosi/SkyEpubForAndroid