Forum Stats

  • 3,852,723 Users
  • 2,264,130 Discussions
  • 7,905,127 Comments

Discussions

PDF to .Doc or Docx converter by core java using standard JDK

661723
661723 Member Posts: 839
edited Oct 5, 2011 2:31AM in New To Java
Hi

is it possible to convert a PDF file to .doc and .docx by standard JDK or JRE library without using any thirdparty library?if it is can anyone give me any pointer class reference to start the thing.I need core JAVA function who will simply accept a .pdf file and convert it to .doc.

kind regards

Edited by: no one on Oct 3, 2011 12:17 AM

Edited by: EJP on 3/10/2011 16:20: typos/spelling errors
Tagged:

Best Answer

  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    edited Oct 3, 2011 5:02AM Answer ✓
    no one wrote:
    Hi

    is it possible to convert a PDF file to .doc and .docx by standard JDK or JRE library without using any thirdparty library?
    No of course not. For two reasons you can reason easily for yourself

    - If it is possible with core Java, why would anyone ever want to write the third party libraries as well?
    - Why would core Java need to deal with proprietary file formats?

    There are hundreds of file formats in existence, should core Java be able to deal with all of them? No, of course not. It is silly to even expect such a thing.

Answers

  • EJP
    EJP Member Posts: 32,920 Gold Crown
    is it possible to convert a PDF file to .doc and .docx by standard JDK or JRE library without using any thirdparty library?
    Only if you rewrite everything that is already in the third-party libraries that you refuse to use.
    if it is can anyone give me any pointer class reference to start the thing.
    Not within the realm of practicality.
    I need core JAVA function who will simply accept a .pdf file and convert it to .doc.
    There isn't one.

    There are however third-party Java PDF libraries such as iText, and MS .doc libraries such as Apache POI.

    What's the aversion?
  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    edited Oct 3, 2011 5:02AM Answer ✓
    no one wrote:
    Hi

    is it possible to convert a PDF file to .doc and .docx by standard JDK or JRE library without using any thirdparty library?
    No of course not. For two reasons you can reason easily for yourself

    - If it is possible with core Java, why would anyone ever want to write the third party libraries as well?
    - Why would core Java need to deal with proprietary file formats?

    There are hundreds of file formats in existence, should core Java be able to deal with all of them? No, of course not. It is silly to even expect such a thing.
  • 661723
    661723 Member Posts: 839
    edited Oct 5, 2011 2:04AM
    hi

    so i need to download poi-bin-3.7-20101029.tar.gz from http://poi.apache.org/download.html and install it $JAVA_HOME/ext??
    Any instruction for its usage??

    kind regards

    Edited by: no one on Oct 5, 2011 2:04 AM
  • EJP
    EJP Member Posts: 32,920 Gold Crown
    so i need to download poi-bin-3.7-20101029.tar.gz
    You need to download the latest stable release
    from http://poi.apache.org/download.html
    from wherever you download it from
    and install it $JAVA_HOME/ext??
    Definitely not.* Install it whereever its instructions say, or at least on your CLASSPATH, and tell your IDE about it too.
    Any instruction for its usage??
    It comes with documentation. This is not an Apache POI help desk. You're asking all these questions in the wrong place.
  • 661723
    661723 Member Posts: 839
    Hi

    context derived to discuss on Apache POI. If you wish you may discuss other related oracle API's too I won't mind either.
    :D

    kind regards
  • EJP
    EJP Member Posts: 32,920 Gold Crown
    I don't know what any of that means but I'm trying to help you here. You should ask in a place where the relevant expertise is congregated, and this isn't it.
This discussion has been closed.