Bug 140824

Summary: LAYOUT DOCX: text doesn't wrap under full-page-length image
Product: LibreOffice Reporter: jon.sandelin
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: 79045_79045, libreoffice
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=125469
https://bugs.documentfoundation.org/show_bug.cgi?id=138492
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104468    
Attachments: Docx conversion to pdf examples
One of 4 same PNG images is not shown in resulting PDF
One of 4 same images overlaps other, making 3 instead of 4 pages
No conversion possible in headless, soffice hangs
Resulting pdf - one image not shown
Resulting pdf - 3 instead of 4 pages

Description jon.sandelin 2021-03-05 13:17:21 UTC
Created attachment 170244 [details]
Docx conversion to pdf examples

Conversion from docx -> pdf with pictures in document yields strange results.
It is reproducable by running the attached docx files with command line
soffice --headless --convert-to pdf docname

It is tested with the same result on version 5.3.6.1 and 7.1.1 on Linux and on Windows.

Attached is 3 examples:
Dok2sweeped.docx: One of the four pictures are missing.
Dok4sweeped.docx: Original document has 4 pages but the pdf only has 3 pages.
DokLoopsweeped.docx: Conversion hangs, no result is produced

I also provide you with the resulting pdf for Dok2sweeped.docx and Dok4sweeped.docx.

Best Regards,
Jon Sandelin
Comment 1 Timur 2021-03-05 14:16:01 UTC
If you have the problem of headless docx to pdf conversion, it doesn't need to be a bug and is not. Bug is fileopen of docx. 
In Dok2 one of 4 same PNG images is not shown
In Dok4 one of 4 same images overlaps other, makimg 3 instead of 4 pages. 
It's easier for you but wrong to attach zip. 
This should be checked in existing bugs for already reported issues.
Comment 2 jon.sandelin 2021-03-05 16:49:32 UTC
Created attachment 170252 [details]
One of 4 same PNG images is not shown in resulting PDF

Attaching separate files instead of zip
Comment 3 jon.sandelin 2021-03-05 16:51:25 UTC
Created attachment 170253 [details]
One of 4 same images overlaps other, making 3 instead of 4 pages
Comment 4 jon.sandelin 2021-03-05 16:53:41 UTC
Created attachment 170254 [details]
No conversion possible in headless, soffice hangs
Comment 5 jon.sandelin 2021-03-05 16:54:54 UTC
Created attachment 170255 [details]
Resulting pdf - one image not shown
Comment 6 jon.sandelin 2021-03-05 16:55:47 UTC
Created attachment 170256 [details]
Resulting pdf - 3 instead of 4 pages
Comment 7 NISZ LibreOffice Team 2021-04-28 08:25:22 UTC
Second image disappears in older versions as well, way back to 3.5.
Comment 8 NISZ LibreOffice Team 2021-04-30 11:45:19 UTC
All images are anchored as character.
Comment 9 QA Administrators 2023-05-01 03:18:48 UTC Comment hidden (obsolete, spam)
Comment 10 Justin L 2023-06-01 20:07:20 UTC
dok2sweeped.docx missing visible image on page 2 fix in 7.6 by
commit 5884a122dc2a2c73865efdbdd861c281475a681e
Author: Justin Luth on Thu Feb 16 09:16:39 2023 -0500
    tdf#153613 writerfilter: split para for inline too if not FirstRun

dok4sweeped.docx invisible text and overlapping image: repro 7.6+
The last image is anchored "to character", but the text it is anchored to is positioned off-screen with a red-arrow indicator instead of wrapping to the next page.