简体   繁体   English

在iOS中将ePub转换为PDF

[英]Convert ePub to PDF in iOS

I am new to the iOS development and am developing document based iPad appliactio. 我是iOS开发的新手,正在开发基于文档的iPad应用程序。 So, Is there any way to convert the epub document to pdf document in iOS. 所以,有没有办法在iOS中将epub文档转换为pdf文档。 Please let me know. 请告诉我。

Thanks Mahesh 谢谢马赫什

I personally don't think that iOS have some tools to do that. 我个人不认为iOS有一些工具可以做到这一点。 Best choice will be upload your document to some unix server and then convert it with pandoc for instance. 最好的选择是将您的文档上传到某些UNIX服务器,然后使用pandoc进行转换。 But be aware that this type of conversion is poor quality fo 99% of documents. 但是请注意,这种类型的转换对于99%的文档来说质量很差。

Seconding pandoc (for which you'll want an OS X, Linux, or Windows system), though I'm here looking for the solution. 尽管我在这里寻找解决方案,但仍然需要Pandoc(需要OS X,Linux或Windows系统)。

Some tips though: 一些提示:

  • An EPUB document is a structured format contained within a ZIP file. EPUB文档是ZIP文件中包含的结构化格式。 Unpack that and you'll get the document in HTML format, plus images, plus structure information. 解压缩该文件,您将获得HTML格式的文档,图像,结构信息。
  • Pandoc is a very nifty converter that will take single documents and convert between many, many file formats, including markdown, HTML, LaTeX, PDF, and ePub. Pandoc是一个非常漂亮的转换器,它将处理单个文档并在许多文件格式之间进行转换,包括markdown,HTML,LaTeX,PDF和ePub。 It won't read from ePub natively, though it seems to me that if you can parse the package.opf file you should be able to reconstruct the document in the form you prefer. 它不会 ePub上原生读取,尽管在我看来,如果您可以解析package.opf文件,则应该能够以您喜欢的形式重建文档。

My general thought is to create LaTeX source from the HTML documents, and use that to produce PDF (or other) outputs. 我的一般想法是从HTML文档创建LaTeX源,并使用其生成PDF(或其他)输出。 I'm seeking tips on simplifying and automating this, will follow up if I find more. 我正在寻求有关简化和自动化操作的技巧,如果我发现更多信息,将进行跟进。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM