Import, parse, edit and save RTF documents with formatting preserved in iPad and Droid apps

那年仲夏 提交于 2019-12-25 02:23:08

问题


My goal...

  • I've .rtf template files at my web server.
  • I need to import those files into my iPad and Droid app.
  • I need to show the contents of imported template file with exact formatting in an RTF editor in my iPad/Droid app.
  • I need to make small changes in templates and save resulting document as rtf/pdf on my iPad or Droid.

What I am NOT asking...

  • I know we can display RTF, DOC and PDF formats in web view but that is a readonly view and is of no use in my case. So PLEASE DON'T TELL ME that a can open files in web view.
  • This open source project can help me in creating an RTF editor for iPad. So PLEASE DON'T TELL ME how to create an RTF editor.

My question simply is...

  • Is it possible to import, parse, edit and save RTF documents with all formatting preserved?
  • If not possible, what is the best alternative (other formats like doc, pdf etc) to do this?

Regards


回答1:


Here is the solution!

Neither iOS nor Android has support for editing and saving DOC/RTF files. But both support HTML. In this case, we can use an HTML editor on iPad and Droid which will definitely appear in a web view (It's up to the developer to give it a native app look and its possible with HTML5!!).

So here are the steps...

  • Mobile app requests the contents of a DOC/RTF file from the web server app.
  • Web app converts DOC/RTF into HTML and sends HTML contents to mobile app.
  • Mobile app displays HTML contents in its HTML based RTF editor.
  • User makes changes to the document in the editor.
  • Mobile app sends edited contents in HTML format back to the web server app.
  • Web server app converts HTML content into DOC/RTF format and saves the file.



回答2:


Finally solved it after months oh hair tearing.

OfficeSuite Pro, the paid version

It's the only thing I've found that even comes close to working. Expensive as apps go, which is cheap as os applications go.

Allows flawless syncing of Scrivener via sync to dropbox, which was my goal.




回答3:


Is it possible to import, parse, edit and save RTF documents with all formatting preserved?

There is nothing built into Android to support this.

There are third-party apps you could link to for RTF editing -- it appears that OfficeSuite Pro 5 offers this, for example.

If not possible, what is the best alternative (other formats like doc, pdf etc) to do this?

There are plenty of third-party editor apps for, say, DOC/DOCX, that you could link to as well.



来源:https://stackoverflow.com/questions/7914641/import-parse-edit-and-save-rtf-documents-with-formatting-preserved-in-ipad-and

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