问题描述
我是比较新的ePub格式,但如果我的理解很好,使编程方式从XHTML或PDF内容开始的ePub可能意味着:
I'm relatively new to ePub format, but if I understand well, to make programmatically an ePub starting from XHTML or PDF content could mean:
- 选择HTML或XHTML内容,并与XHTML验证验证它们(或Tydy清理它们)
- 选择PDF文件中的ePub文件中插入
- 创建XML清单或XML文件的包装和TOC文件
- 压缩在.epub文件整个文件
- 验证ePub格式(我看到在谷歌code东西)
所以我的问题是,如果有某种高层的Java API做这些步骤。当然,我可以使用API为ZIP,XML在Java中,但它存在着较高的工具?
So my question is if there is some sort of high level Java API to do these steps. Sure I can use API for ZIP, XML in Java, but does it exist higher tools?
非常感谢
------ -------编辑
------ EDIT -------
我已经开发了一个开源项目,要做到这一点!
I've developed an open source project to do that!
推荐答案
我还没有看到一个Java工具链的epub;不过,我一直有良好的印记成功。
I haven't seen a java epub toolchain; however, I have been having good success with Sigil.
如果我们的目标是使一个EPUB,我给印记城一展身手。之前我用它我滚动我ePub文件由专人(与蚂蚁的build.xml自动化)。
If the goal is to make an epub, I'd give Sigil a go. Before I used it I was rolling my epubs by hand (with the automation of an ant build.xml).
如果我们的目标是做一个基于java的工具链的epub,那么它应该不是特别难,这取决于你想要多少验证和流水线做。就个人而言,我会开始写一个EPUB阅读器。
If the goal is to make a java based epub toolchain, then it shouldn't be terribly hard, depending on how much validation and pipelining you wish to do. Personally, I'd start with writing an epub viewer.
至于PDF的部分去,我只是嵌入XHTML。还没有需要嵌入PDF呢。至于EPUB验证的推移,如果所有的XML是有效的,并有前荏苒,你将有一个有效的EPUB没有悬而未决的链路。
As far as the PDF parts go, I just embed XHTML. Haven't had a need for embedding PDF yet. As far as epub validation goes, if all the xml is valid and there's no dangling links prior to zipping, you're going to have a valid epub.
这篇关于制作的ePub与Java API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!