Paper size mismatch (A4 → Letter) when converting DOCX to PDF with Gotenberg + LibreOffice
Author: YMistakeCreated Oct 1, 2025Updated Jul 3, 2026
Labelsenhancementlibreoffice
I’m experiencing a paper size issue when using Gotenberg to convert a DOCX file (created in Microsoft Word) into a PDF.
The original DOCX was created in A4 size in Word.
When I convert it with Gotenberg, the resulting PDF comes out in Letter size instead.
If I open the same DOCX with LibreOffice directly on my machine, it also defaults to Letter size, and the exported PDF matches exactly what Gotenberg produces.
So, the generated PDF matches LibreOffice’s rendering but does not match the original A4 layout from Microsoft Word.
Is there a way to force or configure Gotenberg/LibreOffice so that the exported PDF preserves the original A4 paper size from Word?
Source: gotenberg/gotenberg