-
-
Notifications
You must be signed in to change notification settings - Fork 719
Description
Hello,
Our team had previously developed our own docx2pdf conversion microservice based on LibreOffice headless.
It is a Docker with Ubuntu 24.04 LTS + standard Libreoffice version from their repos which is 24.2.
Based on this functioning, docx templates created by our users rendered properly as PDF.
One such example below:
As we transitioned to Gotenberg for all our PDF needs (fantastic project btw!) we also decided to use Gotenberg's docx2pdf service since it is also based on LibreOffice. What's more, the version of LibreOffice is more recent in the latest Gotenberg - 25.8.X which is supposedly optimized for rendering identical to MS Office.
However, when we use Gotenberg for conversion, the documents look wrong - a lot of items are misplaced or incorrect layout / margins:
After long searches and endless attempts to find solutions, we still cannot establish what might cause the difference of render.
We have ensured that all fonts are present and exactly the same between our own service & Gotenberg.
Our tech tried to downgrade the version of LibreOffice inside Gotenberg to match version 24.2 same as our own internal docx2pdf conversion service. However when we did this, Gotenberg no longer worked - error messages were returned by the conversion service ("LibreOffice failed to process a document: possible causes include malformed page ranges '' (nativePageRanges), or, if a password has been provided, it may not be required. In any case, the exact cause is uncertain.")
We have searched the Gotenberg documentation extensively as well as the existing Github issues and reports to no avail.
I was wondering if there is any simple solution to this issue that we may have overlooked.
Obviously it is not a solution to request our users to "just update your template" - this isn't a scalable solution and it will produce undesirable effects.
For reference, the command we run on our home made docx2pdf converter - which works as expected, is:
soffice --invisible --headless --nologo --nocrashreport --nodefault --norestore --nolockcheck --convert-to pdf $input_path --outdir $output_dir
Thanks in advance for any assistance you might provide.
And once again, congratulations for this incredible project. It is truly a masterful toolbox.