Hi all,
im having issues converting ODT to PDF I get the following
Dolibarr has detected a technical error.
This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to ‘1’ to remove such notices):
Date: 20180918032557
Dolibarr: 8.0.0
Level of features: 0
PHP: 7.0.30-0+deb9u1
Server: Apache/2.4.25 (Raspbian)
OS: Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Database type manager: mysqli
Latest database access request error: No request in error
Return code for latest database access request error: No request in error
Information for latest database access request error: No request in error
Message: Error generating document for CommonObject. Error: ODT to PDF convert fail :
My setting are as follows
MAIN_DOL_SCRIPTS_ROOT /var/www/html/scripts
MAIN_ODT_AS_PDF jodconverter
i looked on the forum and did find the pyconverter but i get the exact same issue
the file permissions are 777 as this is run only on a local computer
Dolibarr has detected a technical error.
This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices):
Date: 20180918210126
Dolibarr: 8.0.1
Level of features: 0
PHP: 7.0.30-0+deb9u1
Server: Apache/2.4.25 (Raspbian)
OS: Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l
UserAgent: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Raspbian Chromium/65.0.3325.181 Chrome/65.0.3325.181 Safari/537.36
Requested URL: /compta/facture/card.php?facid=1
Referer: http://localhost/compta/facture/card.php?facid=1
Menu manager: eldy_menu.php
Database type manager: mysqli
Latest database access request error: No request in error
Return code for latest database access request error: No request in error
Information for latest database access request error: No request in error
Message: Error generating document for CommonObject. Error: Error during file export addFromString content
Hello,
I presume that you see this recommendation :
As you are on a ARM platform and that this converter is an external tool, you have to check that this tool is available on your system, i.E. you should have java and jodconverter.jar.
Where is your reference to pyconverter? Did you follow another tutorial?
Then, you have to be sure that Dolibarr find them.
You can activate logs registration in Setup / Modules to perhaps have more explicit messages of the error.
When I tired to run the bash script both failed as in original and one from pyconverter version… I’m moving away from the pyconverter vision as its python 2 not 3… I’ll set up logs once I’m home all above it what I tested early this morning.
What logs would you like? My first post had the main error.
I have installed jodconverter via apt im happy to use that as python requires chanes to make it py3 compadible. Ill just used the otd2pdf.sh that is shipped with 8.0.1
if i goto /var/www/html/scripts/odt2pdf
sh odt2pdf.sh test
odt2pdf.sh: 15: [: xtest: unexpected operator
odt2pdf.sh: 37: [: x: unexpected operator
odt2pdf.sh: 64: [: x: unexpected operator
odt2pdf.sh: 68: [: x: unexpected operator
Error: Invalid or corrupt jarfile test.odt
Error while converting odt to pdf: 1
What will be interesting is to get which command is launched from Dolibarr, and which paths are used for get and output documents. And then, is there the return code and a specific error message from jodconverter.
The error logging in the bash script is very vague as is the procedure in odtphp.php file (yes i had a play with that).
also jodconverter works solo in terminal so we can rule that out
Thus, the problem seems to either in jodconverter, or in how it is called.
What is surprising is that it seems to try to consider test.odt as a jar file, which is not, of course.
Do you confirm that
jodconverter test.odt
is running?
The script of v8.0.1 is new according to v7. The difference starts from this commit:
Thus, I presume there is a bug in how the command is built.
This command is registered in logs. This is why I ask you to activate the logs in Setup/Module.
For logs, go to Setup - Modules - and System logs at bottom. By default you get them in a file dolibarr.log in htdocs.
The only difference I can imagine is that the openoffice server is now launched. But error messages weren’t related to server not running…