Bug 98480 - FILEOPEN: DOCX Wrong page layout
Summary: FILEOPEN: DOCX Wrong page layout
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:docx
Depends on:
Reported: 2016-03-07 01:07 UTC by Stéphane Aulery
Modified: 2021-03-08 14:55 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

DOCX file for test (98.46 KB, application/zip)
2016-03-07 01:07 UTC, Stéphane Aulery
form-correct.pdf (119.33 KB, application/pdf)
2016-03-07 01:07 UTC, Stéphane Aulery
form-lo.pdf (120.53 KB, application/pdf)
2016-03-07 01:07 UTC, Stéphane Aulery
form_incorrect_renderring_5.1.0.3.pdf (214.59 KB, application/pdf)
2016-03-07 01:08 UTC, Stéphane Aulery

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Aulery 2016-03-07 01:07:05 UTC
Created attachment 123358 [details]
DOCX file for test

The page layout of some .docx file is wrong. I've attached an archive
containing 3 files:

form.docx - the .docx file in question.
form-correct.pdf - the correct generated PDF file (on MS Windows?)
form-lo.pdf - the PDF file generated on my Debian machine with LibreOffice

The incorrect page layout of form-lo.pdf corresponds to what I can see
in LibreOffice. So, the conversion to PDF is correct (as consistent with
what is shown in LibreOffice), the bug is what is obtained *before* this

Note that the .docx file is open with no errors and no warnings by
Comment 1 Stéphane Aulery 2016-03-07 01:07:27 UTC
Created attachment 123359 [details]
Comment 2 Stéphane Aulery 2016-03-07 01:07:43 UTC
Created attachment 123360 [details]
Comment 3 Stéphane Aulery 2016-03-07 01:08:01 UTC
Created attachment 123361 [details]
Comment 4 Stéphane Aulery 2016-03-07 01:09:20 UTC
R-tested with LO on Windows 7. The layout is better but yet broken.
Comment 5 tommy27 2016-03-12 08:03:27 UTC
I confirm issue under Win8.1x64 using LibO and recent daily build.

LibO shows the DOCX as a 7 page document instead of 5
Comment 6 Timur 2016-03-14 18:44:03 UTC
It's highly unlikely that any bugs of type "multiple problems/bad rendering", will be fixed, so this bug shouldn't have been confirmed so fast.

Each issue (section break, paragraph break, text box, picture...) should be reported separately, after a search for already reported bugs. 
FILEOPEN problems are different from FILESAVE, and DOC is different filter from DOCX.
Only if bugs don't exist, they should be reported separately, even if they happen with the same file.

Issues may preferably be checked before with master LO version from http://dev-builds.libreoffice.org/daily/master/ or using Separate Install GUI tool http://tdf.io/siguiexe in Windows. It downloads and extracts different LO versions, without installing, so you may test different versions. It only needs MS Visual C++ Runtime installed. 

That said, this file suffers from wrong margins, maybe Bug 74367. 
And spacing is wrong, probably also reported, maybe Bug 95851.
Comment 7 Stéphane Aulery 2016-03-14 19:00:37 UTC
I am following what I received. It's not my fault if the user does not properly describe the bugs separately. The guy is nice, it has at least given a document.
Comment 8 Vincent Lefevre 2016-03-15 00:08:51 UTC
I'm the one who initially reported the bug. Note that I'm just an end user, I am not the author of the file and I don't even have a Window machine, and I don't know much about LibreOffice. So, there wasn't much I could do.

Here the DOCX file and the corresponding correct PDF were available on a web site. I wanted to use the DOCX to fill the document electronically, but I saw that the page layout wasn't correct compared to the PDF (so that I had to use the PDF, print it and fill the document manually).
Comment 9 Aron Budea 2016-05-13 22:59:58 UTC Comment hidden (obsolete)
Comment 10 Cor Nouws 2016-05-16 10:52:14 UTC
(In reply to Aron Budea from comment #9)
> This bug at least partly seems to occur because of the difference of
> handling margins and headers/footers by MS Office and LO desribed in bug
> 33304.

Not really. There is a new section that starts at the end of the red colored header ("DEMANDE D’AUTORISATION DE CUMUL D’ACTIVITES A TITRE ACCESSOIRE") with different margins. Writer ignores these margin settings.

Removing the link with 33304
Comment 11 Timur 2016-07-29 07:45:40 UTC
According to Comment 6, I'll close this as Invalid. 

Bug reporting should focus on specific problems:
- wrong tab size between NOM and PRENOM on the 1st page, maybe related to Bug 83309 
- wrong size of spaces in "Secteur d’activité de l’organisme" and "Temps consacré à l’activité accessoire", maybe Bug 94801 - the key issue here
- spacing is slightly different in "Nature de l’activité accessoire", maybe Bug 95851.

BTW, this form is not properly created using form fields, but with spaces.
Comment 12 Timur 2020-03-22 17:43:47 UTC
(In reply to Timur from comment #11)
> - wrong size of spaces in "Secteur d’activité de l’organisme" and "Temps
> consacré à l’activité accessoire", maybe Bug 94801 - the key issue here

I track this in https://bugs.documentfoundation.org/show_bug.cgi?id=130088.