Topic
  • 6 replies
  • Latest Post - ‏2011-01-06T15:12:09Z by SueSims
SystemAdmin
SystemAdmin
4447 Posts

Pinned topic convert word document to any type of image using java

‏2008-01-28T06:12:47Z |
Hi

This is Charles to query about the document conversion to image using any java api.

Can u suggest one java api or class to convert a word document to image.
Updated on 2011-01-06T15:12:09Z at 2011-01-06T15:12:09Z by SueSims
  • SystemAdmin
    SystemAdmin
    4447 Posts

    Re: convert word document to any type of image using java

    ‏2008-02-06T06:07:40Z  
    The MS Word format does not lend itself to easy conversion to a single image! A better bet may be to convert it to an intermediate format like PDF, with which you can later do interesting things. Do a search on "Java Word to PDF converter" and you'll get plenty of pointers...however much of the software libraries are commercial. You may also want to look at Apache POI (http://poi.apache.org/) which is a Java API to access various Microsoft formats including DOC.
  • SystemAdmin
    SystemAdmin
    4447 Posts

    Re: convert word document to any type of image using java

    ‏2008-02-06T10:43:44Z  
    The MS Word format does not lend itself to easy conversion to a single image! A better bet may be to convert it to an intermediate format like PDF, with which you can later do interesting things. Do a search on "Java Word to PDF converter" and you'll get plenty of pointers...however much of the software libraries are commercial. You may also want to look at Apache POI (http://poi.apache.org/) which is a Java API to access various Microsoft formats including DOC.
    Thank you for ur information rich and kind reply.

    I will explain my requirement in detail. If the word document contains images how can we conver the same to a pdf document.

    i searched internet and found: Use Apache POI to read the word document and then use iText java api to write the document to a PDF document. but this time my query is about the word document if contains an image can be contained in the pdf document created using iText java API.

    Kindly requested to revert back soon.

    Thanking you
    Charles v c
  • SystemAdmin
    SystemAdmin
    4447 Posts

    Re: convert word document to any type of image using java

    ‏2008-02-13T17:22:31Z  
    Thank you for ur information rich and kind reply.

    I will explain my requirement in detail. If the word document contains images how can we conver the same to a pdf document.

    i searched internet and found: Use Apache POI to read the word document and then use iText java api to write the document to a PDF document. but this time my query is about the word document if contains an image can be contained in the pdf document created using iText java API.

    Kindly requested to revert back soon.

    Thanking you
    Charles v c
    There are commercial software packages which handle images embedded within word docs. See http://www.pdf-convert.com/convert/DOC-to-JPG.html

    If you can convert the word doc to RTF, you should be able to use something like BIRT from the Eclipse foundation. See http://www.eclipse.org/birt/phoenix/
  • SystemAdmin
    SystemAdmin
    4447 Posts

    Re: convert word document to any type of image using java

    ‏2008-02-15T00:14:57Z  
    Thank you for ur information rich and kind reply.

    I will explain my requirement in detail. If the word document contains images how can we conver the same to a pdf document.

    i searched internet and found: Use Apache POI to read the word document and then use iText java api to write the document to a PDF document. but this time my query is about the word document if contains an image can be contained in the pdf document created using iText java API.

    Kindly requested to revert back soon.

    Thanking you
    Charles v c
    "I will explain my requirement in detail. If the word document contains images how can we conver the same to a pdf document."

    Open Office will do this with the click of a button.
  • SystemAdmin
    SystemAdmin
    4447 Posts

    Re: convert word document to any type of image using java

    ‏2009-01-27T15:53:08Z  
    Doc to PDF is possible, then you can try PDF to image.

    Doc to PDF code:

    import officetools.OfficeFile;
    ...
    FileInputStream fis = new FileInputStream(new File("test.doc")); // works with xls also
    FileOutputStream fos = new FileOutputStream(new File("test.pdf"));
    OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
    f.convert(fos,"pdf");


    All possible convertions:
    html --> pdf
    doc --> pdf, html, txt, rtf
    xls --> pdf, html, csv
    ppt --> pdf, swf

    This guy is providing the java library: http://dancrintea.ro/html-to-pdf/
    check middle page, after php example.
  • SueSims
    SueSims
    4 Posts

    Re: convert word document to any type of image using java

    ‏2011-01-06T15:12:09Z  
    jWordConvert by Qoppa Software is a 100% java library that can convert Word documents to PDF.