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

androidiosipadrtf

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

Best Answer

Here is the solution! enter image description here

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.
Related Topic