My ODT to PDF conversion working properly till yesterday. today Moring when I am trying to generate the invoice, only odt invoice is generating and pdf is not generating.
The odt file also seems to corrupted using libre office, but succesfully repaired using open office.
When I manually run the command on terminal: soffice --headless --convert-to pdf IN2404-0001_HS_USD.odt
it shows the following errors, I tried to update and upgraded the libre office on the server, but still the same issue, I am facing.
I am using the Dolibarr 19.0.1 latest version, I noticed that all ODT generated invoice gets corrupted, and hence, system is not able to convert the ODT to PDF file.
Can any one help me, why ODT Invoice getting corrupted on Dolibarr during invoice generate process.
Hi everybody,
try inserting this function, under “settings, other settings, add”:
name “MAIN_ODT_AS_PDF” value “libreoffice (openoffice, word…)” comment “convert ODT to PDF”.
Greetings.
Did you find a solution? I am having a similar problem. When I generate the .odt file from a template in Dolibarr, the generate file is corrupt. I do not think it is related to the odt->pdf conversion, because this happens after the file is generated for Dolibarr.
Using LibreOffice the template opens with no problem, however opening the generated file LO reports it has corrupted.
Using Dolibarr 20.0.3 and PHP 8.2.22 on Windows Server.
I also have the same problem since version 19 or 20, just tested version 21 still there, all odt come out with the same error, even the base templates from dolibarr itself, i think the conversion process in ubuntu has an error or can not interprete something, i tested first the old standard template and just now the new 21 odt template for invoices for example.
There is only one template for offers that still works, but if i base a new template for other documents on it it only gets worse.
One thing we found out which may have an impact is somehow some documents are in imperial units and some are in metric units, but i’m not sure if this has anything to do with it, all files the system delivers are somehow broken, they get fixed if you open them with libreoffice, but the converter for odt seems not to be able to do the same fix.
I’m still a bit clueless what is the root cause and how to fix this???
I checked all files i have not used any & or other possibly problematic chars like german ä, ö, ü for example, it is normally plain alphabet with underscores for naming, i also checked with and without included pictures etc. still same error.
It sounds like there might be an issue with file permissions or LibreOffice’s configuration on your server. You could try checking the file paths, permissions, and ensure all dependencies are properly installed.
Thanks for the idea but all odt files are so broken that if you download the file and want to open it libre office offers to repair them and then they are ok as odt, my assumption is this broken file problem is the main problem why there are no pdfs, but i can not fully get why or how the files get broken in the first place
till version 18 or so all worked normal and then after either an update of ubuntu parts that are used or an update for the dolibarr system the whole process broke.
There is only one solid offer template that still works normal.