convert docx to pdf table style is different

Hi. I want to convert docs file to pdf in the console.
lowriter --headless --invisible --convert-to pdf --outdir tmp test.docx
The file is converted but it looks different.
Here is a part of the original file:

And here how the same part looks in the converted file:

I also tried different console commands, such as

soffice --headless --invisible --convert-to pdf --outdir tmp test.docx

soffice --convert-to pdf --outdir tmp test.docx

And many other variations, but the result was always the same. Could you please tell me what am I doing wrong here?

You do everything right (except for not writing your used OS and LibreOffice version). Possibly that’s a bug. If your LO is fresh enough, please file a bug and attach a sample docx that would convert wrong. By the way, does it also wrong when converted interactively?

I used 2 servers for testing:

  1. Ubuntu 16.04 | LibreOffice 10m0(Build:2)

  2. Debian 9 | LibreOffice 20m0(Build:2)

If converted in UI - the file looks the same as the original, so this is only the console issue

5.1 and 5.2? wow that’s old.