converting a sourcefile unsing convert-to in headless mode if command fails (due to invalid filtername) - the return code is still 0 - the message converting sourcefile --> sourcefile.<filterName> using <no filtername indicated> - a copy of source file renamed to sourcefile.<filterName> working eg. $soffice --headless --convert-to pdf ./myFile.txt convert /path/to/file/myFile.txt -> /path/to/file/myFile.pdf using writer_pdf_Export $echo $? 0 NON working eg. $soffice --headless --convert-to aDummyFilterName ./myFile.txt convert /path/to/file/myFile.txt -> /path/to/file/myFile.aDummyFilterName using $echo $? 0 ==> the return of the non working example should not be 0 ==> any code pointer welcomed
Code pointer: the conversion is done by the storeToURL() call in desktop/source/app/dispatchwatcher.cxx.
Oh, and please check master, 9a35c05ac58ac2d3e6d76bf21e3cce9d407e7997 improves headless conversion error reporting, but perhaps it does not solve your problem out of the box.
thanks for answer master from this morning (so with the indicated commit), same problem i think the problem is that no exception is thrown when non existing filter (wild guess though)
same problem if specified source file does not exist fails silently return 0
(In reply to Laurent Godard from comment #0) > > $soffice --headless --convert-to pdf ./myFile.txt > convert /path/to/file/myFile.txt -> /path/to/file/myFile.pdf using > writer_pdf_Export > > $echo $? > 0 CONFIRMED with LO 4.4.0.2 + Ubuntu 14.04 Status -> NEW
Laurent Godard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=de900ebdd4fec0fb06d56583ae22b2adc3608a65 convert-to : display error messages in console fdo#88326 It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Laurent Godard committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1989572b219966bf0ba8fd6809adca19c22d3057&h=libreoffice-4-4 convert-to : display error messages in console fdo#88326 It will be available in 4.4.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 67009 has been marked as a duplicate of this bug. ***