How to display a word document in KM as html format

Hi
I developed a portal application in that i am displaying word document using IFrames, from my application i am uploading word document and saving those document in KM
Requirement is that i need to provide an option called "HTML Version" to show this word document in html.
Thanks
Rudradev.

Hi E. van der Palen ,
I did it using TREX API
Thanks & Regards
Rudra

Similar Messages

  • How to convert a Word document to text or html in an ABAP program

    Hi,
    At my client's site, for the recruitment system, they have the word processing system set to RTF, instead of SAP Script. This means that all the correspondence is in Word format. A standard SAP program takes the word letter, loads word, does the mail merge with the applicant's info and then sends the document to a printer.
    The program name is RPAPRT05. The program creates a document proxy (interface I_OI_DOCUMENT_PROXY) and manipulates the document using the methods of the interface.
    Now what we want to do is to instead of sending the document to a printer, we want to email the document contents to the applicant. But I don't know how to get the content from the Word document into text or html format so that I can make an email from it.
    I know I can send an email with the word document as an attachment, but we'd prefer not to do that.
    I would appreciate any help very much.
    Thanks

    Ok, here's what I ended up doing:
    First of, in order to call FM 'CONVERT_RTF_TO_ITF' you need the RTF document in a table with line length 156. The document is returned from FM 'DP_CREATE_URL' in a table with line length 132. So first I convert the table:
        Transform data table from 132 character lines to
        256 character lines
          LOOP AT data_table INTO dataline.
            IF newrow = 'X'.
            Add row to new table
              APPEND INITIAL LINE TO xdatatab ASSIGNING .
              newrow = space.
            ENDIF.
          Convert the raw line of old table to characters
            ASSIGN dataline TO .
          Check line lengths to determine how to add the
          next line of old table
            newlinelen = STRLEN( newline ).
            ADD addspaces TO newlinelen.
            linepos = linemax - newlinelen.
            IF linepos > datalen.
            Enough space available in new table line for all of old table line
              newline+newlinelen = oldline.
              oldlinelen = STRLEN( oldline ).
              addspaces = datalen - oldlinelen.
              CONTINUE.
            ELSE.
            Fill up new table line
              newline+newlinelen(linepos) = oldline(linepos).
              ASSIGN newline TO .
              newrow = 'X'.
            Save the remainder of old table to the new table line
              IF linepos < datalen.
                oldlinelen = STRLEN( oldline ).
                addspaces = datalen - oldlinelen.
                CLEAR newline.
                newline = oldline+linepos.
              ELSE.
                CLEAR newline.
              ENDIF.
            ENDIF.
          ENDLOOP.
        Write the last line to the table
          IF newrow = 'X'.
            APPEND INITIAL LINE TO xdatatab ASSIGNING .
    Next I call FM 'CONVERT_RTF_TO_ITF' to get the document in SAPScript format:
        Convert the RTF format to SAPScript
          CALL FUNCTION 'CONVERT_RTF_TO_ITF'
            EXPORTING
              header            = dochead
              x_datatab         = xdatatab
              x_size            = xsize
            IMPORTING
              with_tab_e        = withtab
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              missing_size      = 2
              OTHERS            = 4.
    This returns the document still containing the mail merge fields which needs to be filled in:
          LOOP AT itf_table INTO itf_line.
            WHILE itf_line CS '«'.
              startpos = sy-fdpos + 1.
              IF itf_line CS '»'.
                tokenlength = sy-fdpos - startpos.
              ENDIF.
              token = itf_line+startpos(tokenlength).
              REPLACE '_' IN token WITH '-'.
              ASSIGN (token) TO .
              ENDIF.
              MODIFY itf_table FROM itf_line.
            ENDWHILE.
          ENDLOOP.
    And finally I use FM 'CONVERT_ITF_TO_ASCII' to convert the SAPScript to text. I set the line lengths to 60, since that's a good length to format emails to.
        Convert document to 60 char wide ascii document for emailing
          CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
            EXPORTING
              formatwidth       = 60
            IMPORTING
              c_datatab         = asciidoctab
              x_size            = documentsize
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              OTHERS            = 2.
    And then the text document gets passed to FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' as the email body.

  • How to display a word document in LiveCycle

    Hi guys,
    I want to create a dynamic pdf form by using LiveCycle Designer ES. In one part of my pdf form I want to display the content from another Word Document. That means this content will automatically update as long as I change the content in Word Document. How can I do that? Or Can LiveCycle do that? Thanks!
    Hui

    Word is not a valid data source. You can connect to ODBC connections or web services. if you want to create one of those to return the doc then so be it ....but you cannot connect to Word directly.
    Paul

  • How to insert a word document or an RTF document into RichTextEditor?

    How to insert a word document or an RTF document into af:richTextEditor. I am using Apache POI for reading the Word document and getting its contents. I am able to display the whole content of the document except the table and image within the document. The data in the table is getting displayed as a string and not as a table inside the editor.
    Can we insert a word/RTF document into a rich text editor?
    Can we insert images into the rich text editor?
    The following is the code that I used. On clicking a button the word document has to be inserted into the <af:richTextEditor>.
    <af:richTextEditor id="rte1" autoSubmit="true"
    immediate="true"
    columns="110" rows="20">
    <af:dropTarget dropListener="#{SendEmail.richTextEditorDrop}">
    <af:dataFlavor flavorClass="java.lang.String"/>
    </af:dropTarget>
    </af:richTextEditor>
    <af:commandButton text="Insert at position" id="cb2">
    <af:richTextEditorInsertBehavior for="rte1" value="#{RichTextEditorUtil.docFile}"/>
    </af:commandButton>
    Java Code: I am using Apache POI for reading the word document.
    import org.apache.poi.hwpf.HWPFDocument;
    import org.apache.poi.hwpf.extractor.WordExtractor;
    public String getDocFile() {
    File docFile = null;
    WordExtractor docExtractor = null ;
    WordExtractor exprExtractor = null ;
    try {
    docFile = new File("C:/temp/test.doc");
    //A FileInputStream obtains input bytes from a file.
    FileInputStream fis=new FileInputStream(docFile.getAbsolutePath());
    //A HWPFDocument used to read document file from FileInputStream
    HWPFDocument doc=new HWPFDocument(fis);
    docExtractor = new WordExtractor(doc);
    catch(Exception exep)
    System.out.println(exep.getMessage());
    //This Array stores each line from the document file.
    String [] docArray = docExtractor.getParagraphText();
    String fileContent = "";
    for(int i=0;i<docArray.length;i++)
    if(docArray[i] != null)
    System.out.println("Line "+ i +" : " + docArray);
    fileContent += docArray[i] + "\n";
    System.out.println(fileContent);
    return fileContent;

    Hi,
    images are not yet supported. Its an open enhancement request for the rich text editor.
    For tables, it seems they are supported but in a basic way (just HTML 4 style) if I interpret the tag documentation correct
    http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12419/tagdoc/af_richTextEditor.html
    Frank

  • How to embed the Word Document and PDF file into Crystal report?

    How to embed the Word Document and PDF file into Crystal report?
    I have word doc which having 10 pages. I need to show all of the 10 pages at a time. I tried OLE object but problem is it shows only one page.
    Is there any solution to show word doc / PDF file in CR?

    Symptom :
    When embedding a pdf document into a Crystal Report, only the one page shows.
    Reproducing the Issue
    Environment:
    Crystal Reports OLE object
    Cause
    An OLE object only displays the first page.
    Resolution
    Embed multiple objects, one for each page
    Or
    Use a hyperlink to the object instead
    Hope this helps!
    Regards,
    Vinay

  • Display a Word Document in the Output

    Hi All ,
    I would like to display a word document in the Output .
    I cheked the demo application 'ZIOS_TEST_SIMPLE_MS' , but i am not able to see the Word Document in the output.
    Do we need to do any settings or configuration to be done to use these controls ?
    Thank You ,
    Radhika.

    You might want to add a browser layer over your flex
    application and let the browser manage the file types. I personally
    use the HTML component from
    http://drumbeatinsight.com/.

  • How to Append two  word documents into single  using   java

    How to Append two word documents into single using java
    we tried this but it's not append the one word document to other
    source code:public class AppendTwoWordFiles {
         public static void main(String []arg)throws IOException
              FileInputStream fi=null;
              FileOutputStream fo=null;
              try {
                   System.out.println("Enter the source file name u want to append");
                   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                   File f1=new File(br.readLine().toString());
                   System.out.println("Enter the Destination file name ");
                   File f2=new File(br.readLine().toString());
                   fi = new FileInputStream(f1);
                   fo = new FileOutputStream(f2,true);
                   byte b[]=new byte[2];
                   while((fi.read(b))!=-1);
              fo.write(b);
    System.out.println("Successfully append the file");
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              finally{
              fi.close();
              fo.close();
    plz reply me quickly ,,,what can i follow

    Use this code ..
    and give the path of the both file like this.....
    source file ---- C:/workspace/Practice/src/com/moksha/ws/test/practice.text
    destination file ---- C:/workspace/City/src/com/moksha/ws/test/practice1.text
    import java.io.*;
    public class AppendTwoWordFiles {
         public static void main(String[] arg) throws IOException {
              FileInputStream fi = null;
              FileOutputStream fo = null;
              try {
                   System.out.println("Enter the source file name u want to append");
                   BufferedReader br = new BufferedReader(new InputStreamReader(
                             System.in));
                   File f1 = new File(br.readLine().toString());
                   System.out.println("Enter the Destination file name ");
                   File f2 = new File(br.readLine().toString());
                   fi = new FileInputStream(f1);
                   fo = new FileOutputStream(f2, true);
                   byte b[] = new byte[2];
                   int len = 0;
                   while ((len = fi.read(b)) > 0) {
                        fo.write(b, 0, len);
                   System.out.println("Successfully append the file");
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              } finally {
                   fi.close();
                   fo.close();
    }

  • HT1284 How can I backup word documents and not have them crowd my screen? Thanks.

    Hi. How can I backup word documents and not have them crowd my screen? I know, you guessed it. I'm a novice, but not ashamed!

    Please explain what you mean when you say backup Word documents crowds your screen.
    I don't see any connection between backup and your screen.
    Allan

  • I want to know how to turn a word document into a jpeg so I can put the document on Facebook as a picture. I have made posters and if I do a print screen they are unable to be read, or if i turn it into a PDF there is no save as jpeg??

    I want to know how to turn a word document into a jpeg so I can put the document on Facebook as a picture. I have made posters and if I do a print screen they are unable to be read, or if i turn it into a PDF there is no save as jpeg??

    iOS device backups are stored in your iTunes library.
    Move your iTunes library to an external drive.

  • How to convert a Word Document to SAP SCript standard text.

    Hi team,
    Does any one know how to convert a word document or text in Word format to standard text.
    So that we can use that standard text in Script output.
    This might be very useful if we need to convert a lot of text into standard text.

    Hi,
    Create the name of the standard text you want in SO10.
    When the editor is called up, select Text -> Upload and then browse for your file(s). Must be saved in RTF format in Word remember.
    Cheers
    Colin.

  • How can I make word document window bigger. Have tried dragging bottom corner out & clicking on '+' sign but this does nothing?

    How can I make word document window bigger. Have tried dragging bottom corner out & clicking on '+' sign but this does nothing?

    Word - Microsoft Support

  • How to convert a word document into the PDF format?

    Please instruct me step by step on how to convert several Word documents into the PDF format?

    If properly installed and updated (depending on the WORD version), you can simply do any of the following:
    1. Open the doc in WORD and select Print, choose the Adobe PDF printer, print.
    2. Open the doc in WORD and go to the Acrobat menu in WORD and select create PDF (this uses PDF Maker).
    3. Open the doc in Acrobat and the conversion should be done based on PDF Maker.

  • How do I store word documents on my iPad or iPhone 5?

    how do I store word documents on my iPad or iPhone 5?

    Have a look at the following:
    http://itunes.apple.com/sg/app/quickoffice-pro-hd-edit-office/id376212724?mt=8&l s=1
    http://itunes.apple.com/sg/app/office2-hd/id364361728?mt=8&ls=1
    http://itunes.apple.com/sg/app/documents-to-go-premium-office/id317107309?mt=8&l s=1
    http://itunes.apple.com/sg/app/polaris-office/id513188658?mt=8&ls=1

  • How do I find word documents on iCloud?

    I have logged on to icloud but when I click on iWork, the only tabs are for keynote, numbers and pages. There is no tab for word documents but then how do I access word documents on iCloud?

    I have no idea as I am not ever going to use a Cloud system for storing my personal files. I have computers for that. Your best bet would be to use Google and type in "Uploading files to Apple's iCloud system". I bet you will get all the info you could ever ask for.
    Good Luck and Best Wishes
    mgmf wrote:
    Oh ok, that might be it. But how do I upload things from the documents folder onto iCloud?

  • Importing Word Documents to RoboHelp 7 HTML

    Hi,
    We are using RoboHelp 7 HTML for our project requirements.
    The approach we adopted is as follows -
    1.) Develop content in MS Word 2003 with proper formatting
    including the styles defined for tables, fonts, paragraphs, various
    levels of headings etc. We will have high number of word documents
    which need to be reviewed by the SMEs before putting them in
    RoboHelp.
    2.) Copy the content to RoboHelp. We are using the File >
    Import > Word Document. We find the following issues in the word
    documents thus imported -
    a.) Formatting errors like the font of the numbered list is
    not consistent. The numbers have a different font while the ontent
    has a different font.
    b.) The content in Tables is also not properly indented. It
    touches the borders.
    c.) Foreign characters are being introduced wherever
    double-quotes are used. Eg: ”r;Other” (it should have
    been "Other")
    How do we address the above-listed issues? How do we get the
    same output in RoboHelp as can be seen in the formatted word
    document? Do you suggest any better alternative?
    Thanks & Regards,
    Anil

    1] Yes. Non-RH users develop the content.
    2a & 2b] What I have noticed is that the numbers appear
    in Times New Roman while the content appears in Arial after
    importing. As mentioned, we have lot of documentation (many word
    documents). So each word doc I import, a CSS gets generated and
    editing them itself is a herculean task. Is there any work around
    this so that we can gain time and carry out the import smoothly?
    2c] Could not find the patch in your website. One of your
    posts says that it is Item 21. But cannot find any downloadable
    link.
    As suggested I tried reading the article in Printed
    Documentation. But really didn't know which one you were referring
    to.
    Regards,
    Anil

Maybe you are looking for

  • Best way to get mp3 converted?

    I need to do "what ever" to get my mp3 music files to my 3g iphone.........!! I search and get everything except what info I need..

  • Why does my (fully charged) macbook air crash every time I disconnect the charger?

    I have an almost brand new (within 6 months) macbook air. I keep it up to date. About a week ago this issue started: everytime I unplug my charger (which is green as the laptop is at 100% power) it crashes. I just did the SMC trick, but it has had no

  • Testing proxy

    Hi All, this is my scenario. MQ->XI-> CRM proxy. Before generating the proxy, I want to test a proxy standalone by giving an xml input message and check some exception functionalities. Can I test a proxy standalone ? thanks Deno

  • Utility for checking OTM Components

    Hello I have installed OATS in several systems (Sand pit, Dev, Test etc). The integration of OTM and open script for EBS works perfectly in some systems and does not work in some other systems. The systems where the OTM integration is not working, we

  • Trying Dreamweaver CS4 without overwritting 8.

    I have been tasked with giving CS4 web standard a trial and develop recommendations for my organization on if it is a worthy upgrade for us. A good way to do this would be to run a trial of CS4.  I am looking for some assurances that it is easy to in