Open GoogleCodeExporter opened 9 years ago
I'm sorry, the correct implementation should look like this:
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.exe");
} else {
return new File(officeHome, "program/soffice.bin");
}
}
Original comment by andreas....@gmail.com
on 25 Jan 2012 at 9:06
Hello Andreas,
the code in the OfficeUtils.getOfficeExecutable() for is correct.
For Windows it should return "program/soffice.bin" and not the .exe wrapper.
The issue with LibreOffice 3.5 on Windows has a different background.
There is a code in the
org.artofsolving.jodconverter.office.OfficeProcess.addBasisAndUrePaths(ProcessBu
ilder) method which supposed to add path to the URE\bin folder of the office
home to the PATH environment variable.
The problem is that the code checks for the presence of the "basis-link" file
in the office home. This is the case for OpenOffice 3.3 and LibreOffice 3.4.
But in LibreOffice 3.5 there is no such file. So the PATH environment variable
is not set correctly and I am getting an error connecting to the LibreOffice
process (same as you).
The attached patch for the OfficeProcess class (against 3.0-beta-4 codebase)
solved the problem for us.
Kind regards
Sergiy
Sergiy Shyrkov
Product Development
---------------------------------
Jahia Solutions Group
web: http://www.jahia.com
---------------------------------
Jahia's next-generation, open source CMS stems from a widely acknowledged
vision of enterprise application convergence – web, search, document, social
and portal – unified by the simplicity of web content management.
Original comment by Sergiy.Shyrkov
on 23 Feb 2012 at 11:56
Attachments:
Hi guys, any plan to release new version ?
Original comment by mletyn...@gmail.com
on 24 Apr 2012 at 11:40
Excellent Idea !! I don't know how to build the sources... If any one could
apply this patch and ad the build to the project it would be find !
Original comment by r...@formaltis.fr
on 28 Jun 2012 at 1:55
Hello,
if you are not building from source on your own, you could perhaps give a try
to the patches version, we use:
https://devtools.jahia.com/nexus/content/groups/public/org/artofsolving/jodconve
rter/jodconverter-core/3.0-beta-4-jahia2/
Kind regards
Sergiy
Original comment by Sergiy.Shyrkov
on 9 Jul 2012 at 5:02
[deleted comment]
I too have this problem, that it fails on windows with
Apache_OpenOffice_incubating_3.4.1_win_x86_install_en-US.exe
I also have LibreOffice_4.0.1 installed, and it ignores that anyway.
Original comment by racu...@gmail.com
on 22 Mar 2013 at 1:13
I had to apply [#1 andreas....@gmail.com] and [#2 Sergiy.Shyrkov] to get it to
work
Original comment by houman.b...@gmail.com
on 26 Jun 2013 at 10:49
[deleted comment]
tl;dr Just put a blank file called basis-link in your LibreOffice folder (in
the same place where a file called ure-link is located) and the problem is
solved.
This is still an issue with LibreOffice 4 so I'm putting this on here in case
someone stumbles upon it. The problem and its cause are as pointed in #2. I was
able to fix it without patching the code though.
The addBasisAndUrePaths method mentioned in the comments above simply reads the
basis-link file to figure out where the directory containing soffice.bin is. On
Windows, the basis-link file does not exist. Therefore, if you look at the code
for the addBasisAndUrePaths method, it just does nothing. This means that it
cannot find the soffice.bin file and the service cannot start.
If you create a file called basis-link and put it where the code expects to see
it, everything works fine. The contents of the basis-link file should be the
relative path from the directory containing the basis-link file to the
directory(called program) that contains soffice.bin.
To make that clearer, if LibreOffice is installed in C:\LibreOffice4, both
ure-link and the directory called program will be in C:\LibreOffice4. Create a
file called basis-link and put it also in C:\LibreOffice4. The directory called
program and the file basis-link are in the same directory => the relative path
that you put in the basis-link file is just a blank line.
That's it - really think the developers should fix this bug for Windows users.
It wasn't at all obvious to solve, seems to have been around for a while and
hardly seems like a difficult fix once you know what the problem is.
Original comment by karthik....@gmail.com
on 21 May 2015 at 11:07
Original issue reported on code.google.com by
andreas....@gmail.com
on 25 Jan 2012 at 9:03