JODConverter Drag'n'Drop

JODConverter Drag'n'Drop convert documents from odt, doc, jpg and many more to pdf on the fly.

You drag af file from a mail, file from a Notes document or a file from the filesystem to the widget sitebar. When you are done doing the drop OpenOffice.Org or LibreOffice is used to convert the file if possible to pdf. You are now able to drag the file as pdf from the sitebar to at richtext field in Lotus Notes or the file system.



The code have only been tested on:
  • - Windows 7 with OpenOffice.Org 3.1.1
  • - Windows 7 with OpenOffice.Org 3.4.1
  • - Windows 7 with LibreOffice 3.6.4.3

You need to have OpenOffice.Org or LibreOffice installed on the machine - including headless.

Widget can be downloaded from my site. You can use the updatesite if it suits you better.

When I have the code ready I will make a project on openntf.org and upload my code.

I have added this lines to org.artofsolving.jodconverter.office.OfficeUtils#getDefaultOfficeHome, but OpenOffice.Org or LibreOffice still need to be installed in ProgramFiles(x86) or ProgramFiles.

FileFilter directoryFilter = new FileFilter() {
   public boolean accept(File file) {
      if (file.isDirectory()) {
         if (file.getName().startsWith("OpenOffice") || file.getName().startsWith("LibreOffice")) {
            return true;
         }
      }
      return false;
   }
};
File f = new File(programFiles);
File[] files = f.listFiles(directoryFilter);
for (File file : files) {
      /**
      * We use the firste one we hit!
      */
      return findOfficeHome( file.getAbsolutePath());
}


Created 06/12-2012 by Michael Bornholdt Nielsen