We found another Module1.xba file in another directory at the following address:
/usr/lib/libreoffice/presets/basic/Standard/Module1.xba
We replaced this other Module1.xba file with the new Module1.xba file. We tried again to make a lossless transform both by calling transformDocument in PHP and by running the same command line from our directory /var/www/wonder/www/Les_tests/ where our TestTransformDocument.docx is located:
/usr/lib/libreoffice/program/soffice --invisible "macro:///Standard.Module1.LosslessPdf(/var/www/wonder/www/Les_tests/TestTransformDocument.docx)"
Again nothing happened. No error message and no file created.
The problem is that we don't have any other Module1.xba file in our server. Could it be another file?