Running libreoffice from command line fails silently on Azure Functions environment

I’m trying to use Libreoffice within an Azure Function to convert office docs to PDF.
Having uploaded the Libreoffice files, I am using a command line tool to navigate to the folder and try to run

soffice --version

On my local machine everything works fine (as does the conversion).
Both the conversion and the version ‘test’ command above fail silently on the Azure Function environment with no error output.

I’ve tried to run this programmatically and capture stdout and stderror - but nothing.
Also tried to run soffice --version --backtrace but no log file is created.

Java is installed on the azure functions environment but the user running the process is not root and only has limited permissions.

Are there any ideas that I can try to figure out what may be wrong?

Which LO version is installed there on Azure Function? Use a powershell command like

(Get-Command "C:\Program Files\LibreOffice\program\soffice.bin").FileVersionInfo

as explained in this devblog.

Proper console mode for Windows was only implemented in LO 6.3.

Or isn’t that a Windows?

Thanks for the reply… It’s running on a Windows function environment, the same version as running on my local machine:

ProductVersion FileVersion FileName


6.4.5.2 6.4.5.2 D:\home\site\Libreoffice\program\soffice.bin

Please provide the exact command line used there on Azure Function.

Using the Kudu CMD console via the browser (GitHub - projectkudu/kudu: Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.) I’m navigating into the program folder where Libreoffice is installed and simply typing: soffice --version which produces no output. I have also tried soffice --version > log.txt which produces an empty text file.

I reverted to using the version switch which I figured should be the simplest command which would be guaranteed to produce output - after trying multiple variations of the function command below. The below command does work on my local machine.

The command being used in the function itself is as follows:
soffice.exe --norestore --nofirststartwizard --headless --writer --convert-to pdf --outdir “D:\home\temp” “D:\home\temp\input.docx”

The user that is running the function app does not have access to the Users folder. Could this be relevant?

please try soffice.com

I saw the devblog that you linked mentioning the .com and tried that as well… still the same unfortunately, blank output on the azure Kudu console when trying --version with soffice.com (not on the local machine). Running the function still fails when referencing the com - the process completes, but the output is not there. Stdout / stderror are empty.

Just a further note that I tried changing bootstrap.ini to set the user config path -
UserInstallation=file:///d:/home/site/Libreoffice/$USERNAME
Still no dice unfortunately.

Did you manage to get this working? :slight_smile:

Sadly not, no. I think there is something in the function runtime environment that is preventing LibreOffice from running.