Convert RTF File into HTML in Objective C

喜你入骨 提交于 2019-12-10 11:29:06

问题


How can I convert an RTF file into an HTMLformat ?? I have a text editor which saves the file in rtf format but I need to put the contents on my server. For that I need to convert the rtf file into that of an html.. I am unable to find any help with regards to Objective C . Thanks.


回答1:


I don't know of any library in objective-c that does rtf to html conversion.

However if you are able to perform the conversion server side then that opens up a lot more possibilities, such as php and c# libraries, as well as gnu utilities.

For example (and you can google for many more):

php: Pa software's RTF to HTML converter (paid product), Martin Mevald's rtf2htm (old GPL'ed software), Marcus Fischer's RTF Parse class (GPL'ed code), Zend's LiveDocX or even alternatives to livedocx on SO alternative-for-phplivedocx .. etc

C#: On SO convert-rtf-to-html, simple-convert-rtf-to-html, or from MS Converting-between-RTF-and-HTML

GNU: GNU's UnRTF utility.

If you really want Objective-c then the source code of the php and GNU solutions could be translated - however that will not be a trivial task. As such I still think your best bet would be to do it server side.



来源:https://stackoverflow.com/questions/11049134/convert-rtf-file-into-html-in-objective-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!