Search code examples
apache-flexactionscript-3rtfdocx

Is there a way to convert DocX, OpenXml, or RTF to TextFlow in AS3?


Basically we want to be able to open up a docx file in as3 or Flex 4 and convert it to a text flow while preserving formatting, embedded images, tables, columns, etc. I know theorectically it's possible as the new Text Layout Framework is powerful enough to pull it off, but I haven't been able to find any case where someone has achieved anything along these lines except for Adobe's BuzzWord web app which does just this. Ideally the solution would be for RTF documents as conversions to RTF from anything are pretty familiar.


Solution

  • Buzzword was built before the Text Layout Framework existed; so I do not think it uses it. I was also under the impression--with no facts to back it up--that Buzzword did a server side conversion of the document; not a client side conversion.

    I don't know of any AS3 projects that do this and would recommend taking a look at server side ways to access the data inside the word document. The Apache POI project is one option: http://poi.apache.org/ .

    From there you'd have to create your own conversion from doc to something AS3 can handle.