2 Replies Latest reply on Apr 1, 2009 11:17 PM by Vas_T

    Open .doc and .rtf in AIR

      Hi all. I cann't find the solution on my problem and I'll be really thankfull if somebody can give me an idea on how to solve this. Let me explain: I want to open in my AIR application microsoft word .doc files or .rtf files and maybe display it, or get some peaces of text from it, for example I want to get all the italic text peaces, or bold text peaces, may be to display formula object in my application. Is it possible to realise? May be somebody can give me an idea or useful links. Thanks.
        • 1. Re: Open .doc and .rtf in AIR
          Joe ... Ward Level 4
          RTF is a text-based format that you can parse to convert to something you can display (using HTML, the Text Layout Framework, or the Flash text engine) or extract the information you need.

          The new docx format of word is a compressed XML format that you could extract using the Flash API and similarly convert to something you can display or use.

          Parsing a doc file would require intimate knowledge of the binary file format, but with that knowledge it would be possible (albeit more work than you may want to undertake).
          • 2. Re: Open .doc and .rtf in AIR
            Vas_T Level 1
            Thanks for your reply. I found .rtf and .doc/.docx specifications, and as I see from this documents - it's possible to write custom action script parser, but it'll take a really great amount of time to write .doc/.docx parser, while parsing .rtf is really easy.