kintomiko / jodconverter

Automatically exported from code.google.com/p/jodconverter
0 stars 0 forks source link

Cannot connect to LibreOffice 3.3.0.1 #76

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Before creating a new issue, please post your problem to the group for
discussion first.

http://groups.google.com/group/jodconverter

What steps will reproduce the problem?
1.Install LibreOffice (Linux) version 3.3.0.1
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
JODConverter 3 beta 3, LibreOffice 3.3.0.1, JDK 6 update 23, ArchLinux 64 bit

Please provide any additional information below.
There is a simple fix for this.
In the 'org.artofsolving.jodconverter.office.OfficeUtils.java' modify the 
method 'getOfficeExecutable' like this:
    public static File getOfficeExecutable(File officeHome) {
        if (PlatformUtils.isMac()) {
            return new File(officeHome, "MacOS/soffice.bin");
        } else {
            //return new File(officeHome, "program/soffice.bin");
            return new File(officeHome, "program/soffice");
        }
    }
Change the executable from "program/soffice.bin" to "program/soffice".

Original issue reported on code.google.com by xuantinh@gmail.com on 21 Dec 2010 at 7:26

GoogleCodeExporter commented 8 years ago
My proposed fix is a little bit 'wrong'. Here is the update version for Windows 
and Linux:
    public static File getOfficeExecutable(File officeHome) {
        if (PlatformUtils.isMac()) {
            return new File(officeHome, "MacOS/soffice.bin");
        } else if (PlatformUtils.isWindows()) {
            return new File(officeHome, "program/soffice.bin");
        } else {
            return new File(officeHome, "program/soffice");
        }
    }

Original comment by xuantinh@gmail.com on 21 Dec 2010 at 7:37

GoogleCodeExporter commented 8 years ago
LibreOffice didn't even exist when JODConverter was last released, we need to 
add support for it.

We really need to start "soffice.bin", not the "soffice" wrapper script, 
otherwise the Process handle we get in Java will be useless.

Original comment by mirko.na...@gmail.com on 3 Apr 2011 at 1:26

GoogleCodeExporter commented 8 years ago
Probably the same thing as issue #84

Original comment by mirko.na...@gmail.com on 3 Apr 2011 at 3:48

GoogleCodeExporter commented 8 years ago
When is this being fixed?

Original comment by twcr...@gmail.com on 4 Apr 2011 at 5:49

GoogleCodeExporter commented 8 years ago
When I have time. :)

Original comment by mirko.na...@gmail.com on 4 Apr 2011 at 7:14

GoogleCodeExporter commented 8 years ago
Fair enough!  Interestingly, it just magically started working on our 64bit 
CentOS machine but still fails on our 32bit CentOS box.

Original comment by twcr...@gmail.com on 5 Apr 2011 at 9:36

GoogleCodeExporter commented 8 years ago
Actually we have found that if we install LibreOffice on CentOS 5.5 using the 
RPM instructions (not yum!), we can get it to work using JODConverter as a 
library in our Grails project.  It has always seemed to work on MacOS and 
Windows.  Initially it did not work on our CentOS machines because I installed 
the rpm files in the RPMS directory with the command "su -c 'yum install *.rpm" 
but when I installed on fresh VM with "rpm -Uvh *.rpm" the process starts 
successfully and *works* thus far.

My Linux friend said that using the yum command on a CentOS was probably 
ill-advised on my part.  Obviously, you have to explicitly set office home to 
/opt/libreoffice.  He also advised removing OpenOffice explicitly via 
Add/Remove UI AND via 'yum remove "openoffice*"' to be sure.

Original comment by twcr...@gmail.com on 6 Apr 2011 at 3:15

GoogleCodeExporter commented 8 years ago
Supporting all those different office versions and variants on various 
platforms is a nightmare; you'd need an automated test farm.

Anyway, a work-around for this issue is to set templateProfileDir - see issue 
#84

Original comment by mirko.na...@gmail.com on 9 Apr 2011 at 9:27

GoogleCodeExporter commented 8 years ago
Ok...well for now I have a converter class that overrides the OpenOffice 
defaults and assumes the default LibreOffice locations for office.home but 
still allows configuration.  Works pretty well so far on our test systems.

Original comment by twcr...@gmail.com on 14 Apr 2011 at 4:36

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 7 May 2011 at 1:04

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 7 May 2011 at 3:32

GoogleCodeExporter commented 8 years ago
It works perfectly for me with LibreOffice 3.3.2 

Original comment by david...@gmail.com on 5 Jul 2011 at 12:02