Layout issue when converting to Docx to PDF using LibreOffice headless

Hello, I’m encountering some layout issues, when converting to Docx to PDF using LibreOffice headless, like missing shapes, indention problem etc. I hope someone can help or point me to the right direction if I’m missing something. Thank you.

Lots of things.

  1. You missed every possible detail about your software. What version of LibreOffice you use? What operating system?
  2. No information about exact command line.
  3. Have you tested if non-headless result differs? Why focus on “headless”, if it turns out general problem?
  4. You haven’t provided a sample (preferably all three: a source DOCX, a resulting PDF, and a screenshot of correct expected layout).
  5. Have you tested if fonts are installed? (won’t apply to missing shapes, but definitely can account for indentation…).
  6. Have you filed a bug report?
  7. Maybe most important: you are missing that for LibreOffice, DOCX is a foreign file format. And even though a bug report is useful to improve the result, it will never be perfect.
  8. Maybe I misunderstand, what could “to Docx to PDF” mean exactly.
1 Like

Hi @mikekaganski thanks for your response.

  1. I’m using LibreOffice 24.2.7.2
  2. I’m using a PHP package called Doxswap GitHub - Blaspsoft/doxswap: 📄 🔄 Doxswap is a Laravel package for seamless document conversion using LibreOffice. Effortlessly convert DOCX, PDF, ODT, and more with a simple, elegant API. Supports Laravel storage, configurable settings, and secure file handling. and it’s using LibreOffice headless to convert Docx to PDF
  3. I’m sorry, but I can’t provide those screenshot because of it’s confidential nature
  4. Already installed the necessary fonts
  5. Not yet, I’ll file one
  6. Sorry, it’s a typo, it should be converting Docx to PDF

Actually 3 asked for you, do look, if LibreOffice shows the same error/bugs/changes, when you use the GUI.

When you file a bug/screenshot provide something to check. You may replace all letters A-Z with X for example.
.
Just a “Some error somewhere” is usually not helpful.

indeed → https://bugs.documentfoundation.org/showdependencytree.cgi?id=104520&hide_resolved=1

image