简体   繁体   English

将ePub转换为PDF iOS

[英]Convert ePub to pdf ios

I am developing a ePub reader and i am using a pdf reader for it Code 我正在开发ePub阅读器,并且正在使用pdf阅读器代码

The problem is how convert epub to pdf so i can use the same reader(Leaves) 问题是如何将epub转换为pdf,以便我可以使用相同的阅读器(离开)

Other option is Leaves epub reader version is available then its better idea... 另一个选择是Leaves epub reader版本可用,然后提供更好的主意...

Some code for read pdf file : 读取pdf文件的一些代码:

CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("BornToRun.pdf"), NULL, NULL);
pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);
CFRelease(pdfURL);

Thanks... 谢谢...

Th ePub file contains html or xhtml files with some xml, What you have to do is, ePub文件包含带有某些xml的html或xhtml文件,您要做的是,

1, You need to decompress the ePub file (rename .ePub to .zip, then u can decompress easily). 1,您需要解压缩ePub文件(将.ePub重命名为.zip,这样您就可以轻松解压缩)。 2, Convert the html files to PDF. 2,将html文件转换为PDF。 Ref 参考

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

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