Convert DOC and XLS to PDF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmdr
    New Member
    • Mar 2009
    • 3

    Convert DOC and XLS to PDF

    My team came across a new solution which allow conversion of ms office formats, especially doc and xls to pdf. Solution is provided by this guy on this page: http://www.dancrintea.ro/xls-to-pdf/

    How it works:
    Code:
    import officetools.OfficeFile; // from officetools.jar
    
    FileInputStream fis = new FileInputStream(new File("test.doc" ));
    FileOutputStream fos = new FileOutputStream(new File("test.pdf" ));
    
    OfficeFile f = new OfficeFile(fis,"localhost","8100", false);
    f.convert(fos,"pdf" );
    Are you using a similar solution in Java(or even in PHP)?

    I am currently trying to find more solutions and to compare them for quality and speed.

    Thanks.
  • mjordache
    New Member
    • Oct 2009
    • 3

    #2
    I am using the same solution with good results.

    Before including OfficeTools in our project we've done some research and we did not find other solutions, only maybe a bridge Java-COM and use Microsoft API - not so appealing because then you are blocked on Windows environment.

    Comment

    • rvenezian
      New Member
      • Jan 2010
      • 2

      #3
      I think is the only one(dancrintea. ro/doc-to-pdf/) which can convert both DOC and XLS within the same API.

      Comment

      • sgilberta
        New Member
        • Jul 2009
        • 7

        #4
        thanks sharing the info. i've started looking on a solution initiated by this topic; initially i did not think this is possible to do with java and only ms(c++?) api can do this but I am glad it is possible in Java as well.

        Comment

        • RocoStar
          New Member
          • Feb 2011
          • 2

          #5
          it seems to be the best way in Java.

          Comment

          • RocoStar
            New Member
            • Feb 2011
            • 2

            #6
            is there any C++ api except maybe the one from MS ?

            Comment

            • sgilberta
              New Member
              • Jul 2009
              • 7

              #7
              Does anyone know a JAVA library to do the reverse(PDF to DOC)?
              Thanks.

              Comment

              • voo8
                New Member
                • Dec 2011
                • 4

                #8
                pdf to doc is possible with java as indicated above, but for the reverse(pdf to doc) and not aware of any java library.

                can't you simply call an external tool(command line) for ex?

                Comment

                • karolaina
                  New Member
                  • Feb 2013
                  • 1

                  #9
                  nice, I did not think it might be possible with Java.

                  Comment

                  Working...