


With those settings, LibreOfficeportable is portable even for the JODConverter. To get a proper user settings folder, we had to start libreoffice.exe -safe-mode to factory reset the user settings. You just have to point to %LibreOfficeHome%/App/libreoffice for your officehome and everything should work fine. However, now that we have a proper user settings folder, everything works fine using libreoffice portable distributed with it. The changes do not work in case you want to open multiple instances of LibreOfficePortable. Not sure yet it is the right way to go but it is the first that comes in mind. One way to do this would be to extract this line from the prepareProcessBuilder function (we should use an argument to receive the executable file instead) and you will then be able to check if the executable file is the one requiring a sleep in the start function. This sleep should be apply only when office is started using a LibreOfficePortable executable (not a regular office installation). Adding a 1 second sleep right before this line seems to do the trick, but I didn't test it a lot. A quick solution would be to check if there is a LibreOfficePortable.exe in the specified office home path when we search for an office process and return it if there is one.īut then the LibreOfficePortable executable is responsible to start the real office process, and this means that we must wait a while before trying to retrieve the office process PID after the LibreOfficePortable process is started. I did some tests today in order to understand how the wrapper works. So it needs to close a different process than the one it opened, which is either the soffice.exe or the soffice.bin (the soffice.bin seems to work better, but we did not test that extensively yet).Įdit: THIS IS NOT REQUIRED, DO NOT INCLUDE INTO DOCUMENTATION. On close, it is important that the JODConverter does not close the LibreOfficePortable.exe, since that is only a wrapper.You need to start LibreOfficePortable from the LibreOfficePortable.exe (that can be solved by somehow detecting that the officepath is within a libreofficeportable, then it uses a different executable path which points to the LibreOfficePortable.exe).

If I told you what the significant differences are, could you help me to find the places where I should apply those changes to contribute back to you? However, I am sure I do it a bit too much quick and dirty. Therefore I took your source and started to modify it for the support. Now I realized that LibreOffice Portable works a little differently. We recently switched to LibreOffice Portable to easily distribute LibreOffice with our software.
