Hello
I’m using Ubuntu Server 12.04 64bit and LibreOffice 3.5 (from the official Ubuntu repository). My Java EE application needs to convert Word files (.doc and .docx) to PDF on the commandline.
Converting a non-password-protected Word file works like a charm. If I try to convert a password-protected Word file (.doc, .docx) to PDF, it fails without any stderr, e.g.:
server:~/pdftest# /usr/bin/libreoffice --headless -convert-to pdf ‘myFile.doc’ -outdir ‘/root/pdftest/’
Does somebody know what I’m doing wrong here or is this the regular behavior?
EDIT: If the goal is not clear: my Java application needs an output, which identifies failed conversion in order to handle the file in another way.
EDIT2: I’m aware of the possibility to check if there is a PDF after the conversion. If the PDF is not available, then I know, the conversion failed. But in my opinion it would be better, if the command throws an exception or asks for the password at least, but just doing nothing is a bit strange.
Thank you very much,
Marco