Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Default Java API for RTF to DOCX Conversion

    Please suggest me any Java API RTF to DOCX Conversion. I have tried the following utilities but could not find anything useful for my requirement.

    Aspose.Words for Java
    The issue that we face with Aspose.Words for Java library is that some of the images present in RTF file are blown up in DOCX file.

    OpenOffice
    We tried to use OpenOffice for our conversion, but found that it does not support saving in DOCX format.

    Please find the message in the forum

    Yes it is, support was added in 3.0, although you can't save in that format.

    [Solved] Batch conversion of .docx to PDF (View topic) • OpenOffice.org Community Forum

    Apache POI
    The Apache POI Java APIs is used for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2).

    But it does not support reading RTF. Please find the information that we got from forums.

    No, POI has no provisions for reading RTF. But the basic structure of RTF isn't complicated. If you spend some time with the specification (such as there is) and study a few simple RTF files, you should be able to write code that parses the file contents and extracts the actual text.

    how to read rtf file and display in console? (Beginning Java forum at JavaRanch)

    No. RTF is not an OLE 2 Compound Document Format (hence the header error), nor is it a closed format, nor even binary and there are plenty of libraries that can read/write it. POI only covers "nitch" formats (OLE 2 Compound Document based).

    POI - User - Reading rtf files using POI-HWPF

    JODConvertor

    JODConverter is supporting DOCX as input but not as output format.

    Please find the error trace when we tried converting RTF to DOCX.
    Dec 27, 2010 8:16:51 AM com.artofsolving.jodconverter.openoffice.connectio n.AbstractOpenOfficeConnection connect
    INFO: connected
    Exception in thread "main" java.lang.IllegalArgumentException: unsupported conversion: from Rich Text Format to Microsoft Word 2007 XML

    docx4j
    docx4j is an open source Java library for manipulating OpenXML WordprocessingML documents, released under the Apache software licence.

    It supports creating, reading and saving DOCX files and export them to PDF/HTML. But, it does not help in reading RTF file.

    We have also come across utilities like Docmosis, Java2Word, javadocx and iText. But none of them helped in converting RTF to DOCX.

    Any suggestion on this is much appreciated. Thanks :)

  2. #2
    Qubes is offline Member
    Join Date
    Jan 2011
    Posts
    10
    Rep Power
    0

    Default

    Maybe to late but did you allready find something?

    I just saw javadocx, din't look at everything but they can create docx files.
    I didn't find what I am looking for but I will investigate that later this week.

    Cheers

    Qubes

Similar Threads

  1. Replies: 2
    Last Post: 03-10-2012, 12:46 AM
  2. Copying a file (.docx) from computers
    By chyrl in forum Networking
    Replies: 3
    Last Post: 07-02-2010, 03:02 PM
  3. tcl to java conversion
    By mark_wit in forum New To Java
    Replies: 2
    Last Post: 08-24-2009, 09:58 PM
  4. .java > .class conversion
    By Fate_Remai in forum New To Java
    Replies: 18
    Last Post: 07-31-2008, 03:12 AM
  5. IDL to Java conversion using idltojava
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-07-2007, 01:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •