LibreOffice headless pdf conversion different word breaks – how to equalize? [closed]

When I convert a docx document to a pdf document at my development computer (debian 12.2 with LibreOffice 7.6.3.2), then the pdf document contains hyphenation: a long word is split up into two lines, e.g. the German word “Datenschutz” is split up into “Daten-” at the end of one line and “schutz” at the beginning of the following line.

When I convert the same document to a pdf document at my server (debian 12.2 with LibreOffice 7.6.3.2), then the pdf document contains no hyphenation. “Datenschutz” is moved as a hole into the second line and this happens also with all other long words at the end of a line. They are not split up.

In both cases I use the same command:

libreoffice7.6 --headless --norestore --nofirststartwizard "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_myuser" --convert-to pdf:writer_pdf_Export --outdir /home/myuser/ /home/myuser/test.docx

Where could this difference come from?
And how can I equalize the output so that both systems split up / break words?

In both cases the font is Verdana and in both cases I installed ttf-mscorefonts-installer 3.8.1. So the size of the characters should be the same in both cases.

  • 1

    Format/Paragraph uncheck 'Automatically', then words should not get breaks. (found here: ask.libreoffice.org/t/… )

    – 




  • Nice. This equalizes the results. Unfortunately there are a lot of very long words in the documents so I would prefer to do “always on” instead of “always off”. But turning hyphenation off is a (temporary) workaround. 🙂 Thanks!

    – 

  • I vote to close this question because it is not about programming.

    – 

  • 1

    You can change when words get hyphenated by changing the options, one of them can only hyphenate long words, if set to a high enough value (see: Minimum word length in characters

    – 

  • I’m voting to close this question because changes of getting an answer about programming is not likely…. 😉

    – 




After installing the German language pack hyphenation is equal in both cases.

  • wget https://download.documentfoundation.org/libreoffice/stable/7.6.3/deb/x86_64/LibreOffice_7.6.3_Linux_x86-64_deb_langpack_de.tar.gz
  • tar -xvf LibreOffice_7.6.3_Linux_x86-64_deb_langpack_de.tar.gz
  • cd ./LibreOffice_7.6.3_Linux_x86-64_deb_langpack_de/DEBS/
  • sudo apt install ./*.deb

Leave a Comment