Converting .odt to .pdf


Java Documents

Topic:

Java Documents

  1. alaincnes wrote: 23/01/2007 at 16:14 pm

Default Convert .odt to .pdf


  1. Good morning
  2. I have an .odt file that I want to convert to a .pdf whatever the platform. I don’t want to touch the content or even read it.
  3. Has anyone ever done this before? With what? How?
  4. Thank you in advance
  5. Christophe P. wrote: 25/01/2007 at 14.38 hrs.

Default


  1. Just open the document (with Open Office) and click on start pdf generation (menu File/Export to pdf or pdf icon). It works pretty good.

    To do it automatically, you have to use an Open Office library (I don’t know).

  2. SegmentationFault wrote: 22/03/2007 at 17h08

Default


  1. may be that you don’t need it anymore, but for those who will find this massage one day: there is www.conv2pdf.com that converts openoffice format files to pdf and many other

    formats. The conversion is done online so it is valid for any platform.

  2. ner0lph wrote: 06/03/2008 at 1:26pm

Default Command line ?


  1. Good morning
  2. Since the question and the subject are fairly general, I will allow myself to go back to it.
  3. Is there a program, even for a fee, to convert ODT to PDF?
  4. The goal is to automate the tasks and I can have several dozen conversions per day to do via my (web) application.
  5. We can consider installing OOo on the server, but in this case, what is the command to use on OOo to convert to PDF?
  6. Thank you in advance.
  7. azerr wrote: 06/03/2008 at 13h43

Default


  1. Good morning
  2. The JODConverter

    API allows you to convert an ODT file to PDF. This API uses OpenOffice to convert documenets. So this API but requires to install OpenOffice in server mode.

  3. Angelo
  4. ner0lph wrote: 10/03/2008 at 18:40 pm

Default


  1. Thank you azerr/Angelo. What do you mean by “installing OpenOffice in server mode”? Just install it normally on the server, right?
  2. Otherwise, following my research, to create a PDF, you can go to :

    • or by PDFCreator, which must be configured as “automatic saving” in a directory (and tweak to retrieve the PDF by managing concurrent accesses);
    • or by launching a macro that performs the conversion via the command line ;
    • or by DDE calls (I don’t know if it works).

  3. Anyway, anyway, it’s a hassle because you have to install OOo on server
    8O
    , and that bothers me.
  4. Just for information, my goal was to be able to fill out PDFs with data entry forms and save them (on server). So, the solution would be to create an ODT, put ${FIELD} instead of the fields (for example); on the client side, the web interface displays the list of fields (with labels), saves the entry in the ODT (since it is zipped XML) then converts the ODT to PDF, saves it on the server and displays it to the user for printing.

    Otherwise, another solution, less fiddly and more elegant than the installation of OOo on the server (and which I prefer): the use of PDFTK, whose use from a PDF fields point of view would be quite simple.
    8-)

  5. But all this is not Java (so not in the right category / forum topic).
    :oops:
  6. In short, my problem is almost solved, but a solution for free conversion of OpenDocument to PDF is always welcome (especially on a user station to right click -> convert to PDF
    :)
    ).
  7. azerr wrote: 10/03/2008 at 19h10

Default


  1. Thank you azerr/Angelo. What do you mean by “installing OpenOffice in server mode”? Just install it normally on the server, right?
  2. You’re welcome,
  3. Yes, it must be installed on the server, but it must be launched in server mode, using the command :
  4. C:\Program Files\OpenOffice.org 2.2\program/soffice.exe -invisible -accept=socket,host=0,port=8100,tcpNoDelay=1;urp,Negotiate=0,ForceSynchronous=0
  5. With this command, OO listens on port 8100 and you can then use it with JDocConverter.
  6. Just for information, my goal was to be able to fill out PDFs with data entry forms and save them (on server). So, the solution would be to create an ODT, put ${FIELD} instead of the fields (for example); on the client side, the web interface displays the list of fields (with labels), saves the entry in the ODT (since it is zipped XML) then converts the ODT to PDF, saves it on the server and displays it to the user for printing.
  7. Your idea is very good, and in fact there is another JOOReports project that does exactly that. It uses internally the Freemarker template engine.
  8. Angelo
  9. ner0lph wrote: 19/10/2010 at 02:34 am
You May Also Like