Hi. I’ve been working with an organisation to implement document conversion, and spent many hours trying to figure why the Windows version soffice.exe (5.4.4) was not converting documents, and saw a lot of people reporting the same issue but with no real resolution.
After much experimentation, I discovered that LibreOffice’s executable does not actually tolerate literal strings (and thus, by extension, spaces) when supplying either directory or filename arguments to convert-to. The only exception seems to be the calling of the LibreOffice executable itself, which can be a literal string - all subsequent arguments appear not to allow spaces of any kind.
So, for example:
“C:\Program Files\LibreOffice 5\program\soffice.exe” -headless -convert-to pdf -outdir “C:\Some Directory” “C:\Some Directory Complete\Some Document.doc”
Won’t work because the arguments to LibreOffice use literal strings, spaces, but:
“C:\Program Files\LibreOffice 5\program\soffice.exe” -headless -convert-to pdf -outdir C:\Directory C:\Directory\Test.doc
Will, as it contains no literal strings or spaces. I find this hard to believe it’s intentional given that most filenames will contain spaces. Why is this? Is it a bug? Do the arguments have to be called in a different manner?
Not that I think it’s relevant, but: Windows 7, LibreOffice 5.4.4, called via cmd.exe using the above arguments.