3

Need to convert DOCX document to PDF using LibreOffice in command line mode. But it crashes:

soffice.exe -headless -invisible -convert-to pdf myfile.docx

It also crashes when trying to open the same document:

soffice.exe -o myfile.docx

However, it opens the file perfectly when opening LibreOffice from the Start menu.

Here are Windows 7 (32-bit) error details (in Spanish, no translation yet):

Firma con problemas:
  Nombre del evento de problema:    APPCRASH
  Nombre de la aplicación:  soffice.bin
  Versión de la aplicación: 4.3.2.2
  Marca de tiempo de la aplicación: 541af548
  Nombre del módulo con errores:    MSVCR110.dll
  Versión del módulo con errores:   11.0.51106.1
  Marca de tiempo del módulo con errores:   5098858e
  Código de excepción:  40000015
  Desplazamiento de excepción:  000a327c
  Versión del sistema operativo:    6.1.7601.2.1.0.256.1
  Id. de configuración regional:    3082
  Información adicional 1:  da3c
  Información adicional 2:  da3c0e7aedc374a773565a4a8dfc0c7a
  Información adicional 3:  7958
  Información adicional 4:  795815baca3b4b1817fdd25f3f5f80de
German Latorre
  • 10,058
  • 14
  • 48
  • 59
  • In what way does the crash manifest itself? Do you get an error? – halfer Oct 02 '14 at 10:45
  • It shows one of thouse informative funny Windows dialogs that says "LibreOffice has stopped working" – German Latorre Oct 02 '14 at 11:01
  • OK, what version of Windows? (I don't know if it matters, but it might do. If you can get into the habit of adding all this information first time around, that helps! Thanks). You can always try a different/clean install of Windows using the images from http://modern.ie and VirtualBox. – halfer Oct 02 '14 at 11:48
  • 1
    Edited accordingly, :-) – German Latorre Oct 02 '14 at 11:50
  • Great stuff. Might be worth searching at the bug tracker for OpenOffice to see if this (or something similar) has been reported. Might be worth switching your system to English so you can search for the English versions of error messages too. – halfer Oct 02 '14 at 11:51
  • 1
    Also, is this for a web service or similar? If so, do you plan to actually use Windows in production? If not, try Linux - I wouldn't be surprised if that was more stable. – halfer Oct 02 '14 at 11:52
  • It actually works in Mac OS X, so no doubt it will work with Linux... However, our production environment is Windows. I'll give it a try in different Windows versions. – German Latorre Oct 02 '14 at 12:09
  • If you have plenty of spare RAM on your production Win servers, or if you can set up a new server, you could install this in a small virtual Linux container as an immediate workaround. Not ideal, but something that will get you working straight away - during which time you can report the bug to LibreOffice (if it is not already reported). – halfer Oct 02 '14 at 12:38
  • I encounter the exact same problem, have you found any solution? – Amir Pashazadeh Nov 02 '14 at 16:33

1 Answers1

2

It's a confirmed bug for LibreOffice 4.3.x on Windows

see: https://www.libreoffice.org/bugzilla/show_bug.cgi?id=85777

And it can be workaround by

start /wait "lo" "C:\Program Files (x86)\LibreOffice 4\program\soffice" C:\a.ods
rufushuang
  • 302
  • 4
  • 17