Issue converting docx to pdf

Hello, I have docx file with two pages (first of it has album orientation and the second page has book orientation), here it is:


But when I try to convert it to pdf with command

 soffice --headless --convert-to pdf /app/1.docx --outdir /app

I get pdf file with 4 pages:

Obviously content of the each page of docx file did not fit into exactly one pdf page.

What would you suggest me to do to solve this problem?


p.s. I have Ubuntu 16 and LibreOffice 20(Build:2)

This does not happen on my system, which is a GNU/Linux system (openSUSE 15.2) using LibreOffice, Packages from TDF (

Checked with 7. Two pages. Looks fine:


Remove .jpg from the file name, it is a PDF file actually.

P. S. Posting this as an answer only to be able to attach a file.

P. P. S. Is Calibri present in your system?

Suggested solution: either install Calibri and other Microsoft fonts or change them (wherever used) to similar ones present in your system.

that is how I would like it to look… Maybe something is wrong with my libreoffice.

I am not exactty fluent how to set up fonts to libreoffice running in the server. Need to google that…
Are there some default fonts libreoffice is shipped with?

As far as I understand, LibreOffice relies on system fonts, only OpenSymbol is installed with LO. The matter, however, is about your document having formatting with Microsoft fonts that are not, obviously, supplied with LibreOffice. I guess a package of Microsoft core fonts should be available for your distro, but it does not necessarily include the fonts in question.

gabix thanks for reply. It made me understand what happened.
Changed the font to Arial and it works now