Why does LibreOffice still have such poor formatting of .docx and some doc files despite the claims of improvement?

I’ve noticed that there is still very poor formatting of (most) .docx documents, especially those containing fields and graphics. The same thing happens with .doc files. Yet, LibreOffice is supposed to be able to handle these smoothly now. Am I missing something?

P.S. my apologies for asking such a vague question; right now the particular file I’m using has sensitive information (it belongs to someone else to besides). However, if I can find another test document I will show you a screenshot.

One of the main problems is that images are not aligned correctly. They show up as being either outside of or offset on the page. Also, the document (a letter), contains pages with different layouts (one page is landscape, the other is portrait), but it attempts to lay each page out as landscape.

Thanks for providing additional detail. DOCX picture position bugs: FDO#47545, FDO#48187, FDO#49260, and FDO#56760. Please have a look at the test files. DOCX page orientation bug: FDO#44457. Any of these similar to your problems?

We never claimed that we can handle docx or doc files perfectly. This is actually nearly impossible as the OOXML standard has more than 6000 pages and the doc filter was written in a time when there was no specification of the file format available.

We are improving the filters by time. However if you have documents that are not opened correctly we ask you to have a look at bugzilla if it is reported already and otherwise open a new bug report with a test document. Without test documents showing issues it is much more difficult for us to fix these issues. But please note that this does not mean that we can promise to fix your issues soon as we have dozens if not hundreds of similar issues.

You are going to have to provide greater detail about exactly what types of fields and graphic elements are not being handled correctly and what is occurring i.e., expected behaviour vs observed behaviour. DOC/DOCX support will gradually improve over time and usually does so with each point release, partly as a result of supporting new features within the massive MS specifications, and partly as a result of bug fixes.

Sometimes there are unfortunately regressions that need to be fixed and this may be what you are experiencing. As the v4.0.x series moves along the release plan from a bug-fix phase (the early subpoint releases) towards increased feature support (the later subpoint releases) there should be an improvement. To give one example of the progress being made, here is a blog entry by one of the developers involved with improving this aspect.

As @mmohrhard already said

We never claimed that we can handle docx or doc files perfectly.

Additionally MSO files are moving targets. IMHO MS wants be a moving target just to protect their revenues.

However, our devs are getting closer and closer.

Maybe you can consider to work more with pdf-files when you need to exchange files. In my experience exchanging pdf-files is more often sufficient than most people think. This, just because they are used to exchange original files and never consider(ed) to exchange via pdf-format.

unfortunately,

different version of ms office have same problem. and actually in my office, there are 4 office suite in use.

LibreOffice, Kingsoft Office, yozo office,(all latest) and Ms Office 2003

Could there be problems? yes.

Do your own to solve those problem if you find yourselves not using style or universal way to handle these document.

First thing to do is fixing your way processing document.

  1. Tab replace space

  2. Leave space/margin

  3. Install same fonts on all machine and export to pdf when necessary.

I have also notice problems with images in LibreOffice Writer. The problem I see is that images where re-sized in MS-Word. If the file is yours or from the user that you can influence is to ask user to re-size images in image editing program and then import it in Writer. This is proper way anyway because if importing large image and then re-size in office program then the whole image is still stored in program - waste of disk space that file occupies.

Image alignment is a tricky thing, even if you open the same document in MS Word, and for example you change the page size from A4 to Letter, or you change the printer to print to, and it all goes suddenly wrong.

My recommendation is to pay attention how you insert the images, and choose the method that suits your objective

  • In line (As character) to keep it with the text vs. Floating to flow text around
  • Relative to page borders to keep it on a page or flowing with a paragraph
  • Assuring a certain page layout via tables

Portrait / Landscape also depends how was it defined in the original document, as sections, after a page break, etc.

  • Main objective is to keep the layout, use PDF.
  • Main objective is to heavily edit the text, use DOCX.