Bug 129085 - From version 6.1.x, some images in Writer not printed with "Tight" or "Through" or "Parallel" wrap
Summary: From version 6.1.x, some images in Writer not printed with "Tight" or "Throug...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.6.3 release
Hardware: All All
: high critical
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0
Keywords: bibisected, bisected, regression
: 126313 128358 132364 137056 138115 138515 139124 139639 140426 (view as bug list)
Depends on:
Blocks: Print
  Show dependency treegraph
 
Reported: 2019-11-28 18:54 UTC by Martin Schoenmakers
Modified: 2021-03-17 07:05 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
The problematic document with the 4 images. (156.50 KB, application/msword)
2019-11-28 19:04 UTC, Martin Schoenmakers
Details
The resulting print (pdf made via Print - Microsoft Print to PDF (213.80 KB, application/pdf)
2019-11-28 19:06 UTC, Martin Schoenmakers
Details
Test pdf (76.32 KB, application/pdf)
2019-11-28 19:19 UTC, Julien Nabet
Details
Coverpage - Image left corner not printed properly (222.57 KB, application/vnd.oasis.opendocument.text)
2021-02-22 11:50 UTC, C.R.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schoenmakers 2019-11-28 18:54:37 UTC
Description:
I have ~100 invoices with 4 images (logos etc). Up until version 6.1.1.2, these print perfectly OK. 
Now upgraded to version 6.3.3.2: one image prints, 3 images do not print (in all of those documents that earlier printed fine).
I tested this on Win7(64) and Win10(64), and also tested version 6.2.8.
Exporting to a PDF does show the images as expected. This is a workaround: printing the PDF works fine.


Steps to Reproduce:
I have also tried de-installing that new 6.3.3.2, removing all stuff in ...\Roaming\..., still same result.
I have also tried changing Settings-LibreOffice-View-Use OpenGL to not checked, still same.
De-installing the new version and then installing the old 6.1.1.2 completely solves the problem.

Actual Results:
Topmost logo is printed, 3 images at the bottom do not print. 

Expected Results:
Print all 4 images.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
The user profile can not be the cause, as I tested this also on a PC with no former installation of LibreOffice.
Comment 1 Martin Schoenmakers 2019-11-28 19:04:28 UTC
Created attachment 156171 [details]
The problematic document with the 4 images.
Comment 2 Martin Schoenmakers 2019-11-28 19:06:09 UTC
Created attachment 156172 [details]
The resulting print (pdf made via Print - Microsoft Print to PDF

The paper-prints look the same as this PDF: 3 bottom images missing.
Comment 3 Julien Nabet 2019-11-28 19:19:47 UTC
Created attachment 156173 [details]
Test pdf

On pc Debian testing x86-64 with master sources updated today, I don't reproduce this.

I attached pdf example where the 3 logos are present at the end.

Idem with LO Debian package 6.3.3.2
Comment 4 Julien Nabet 2019-11-28 19:21:34 UTC Comment hidden (obsolete)
Comment 5 Martin Schoenmakers 2019-11-30 10:10:16 UTC Comment hidden (obsolete)
Comment 6 Julien Nabet 2019-11-30 11:17:17 UTC Comment hidden (obsolete)
Comment 7 Dieter 2019-12-02 07:11:25 UTC Comment hidden (obsolete)
Comment 8 Timur 2019-12-02 08:06:23 UTC
Reproduced in Windows, LO 6.1.6, 6.2.8 and 6.5+ with Print to PDF.
No repro for me in 6.0 and for reporter in 6.1.1 so regression. Looks like some backport to 6.1 went awry. 
Print Preview and preview in Print are fine in 6.5+ (but preview in Print is wrong in 6.1.6). 
Export to PDF is also fine.
Comment 9 Martin Schoenmakers 2019-12-02 08:23:25 UTC Comment hidden (obsolete)
Comment 10 Telesto 2020-01-10 22:12:30 UTC
Bisected to
author	Armin Le Grand <Armin.Le.Grand@me.com>	2019-04-02 17:59:40 +0200
committer	Armin Le Grand <Armin.Le.Grand@me.com>	2019-04-02 21:03:07 +0200
commit 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c (patch)
tree 3fae3016fd6960121f40c2391f252e2a94377e21
parent 958442c89237eece4ff2467a7800bca6b0be9fe7 (diff)
tdf#124272 use ClipRegion's geometry if not a rectangle
By error the ClipRegion's geometry was replaced by it's
BoundRect expanded to PixelBounds. If the ClipRegion
is not a rectangle, this will create wrong results. To
do both - extend to PixelBounds and have the original
geometry included - use the PolyPolygon topology as
needed (see comment in code for details)

https://cgit.freedesktop.org/libreoffice/core/commit/?id=362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c
Comment 11 Telesto 2020-01-10 22:13:13 UTC Comment hidden (obsolete)
Comment 12 Timur 2020-05-18 07:20:48 UTC
*** Bug 132364 has been marked as a duplicate of this bug. ***
Comment 13 Timur 2020-09-23 11:17:06 UTC
*** Bug 128358 has been marked as a duplicate of this bug. ***
Comment 14 Timur 2020-09-23 11:18:29 UTC
Bug 128358 was bibisected to commit c2ae30b19d8145271f1189c9757d59d43de391c7 from the same bug 124272
Comment 15 Timur 2020-09-23 11:20:12 UTC
Xisco, I think this one is for ESC, to see if someone can be pointed to this bug or regression commits reverted.
Comment 16 Timur 2020-11-11 15:24:32 UTC
*** Bug 138115 has been marked as a duplicate of this bug. ***
Comment 17 Timur 2020-11-12 07:53:43 UTC
Main bug 129085 has DOC attachment 156171 [details] where JPG images with Tight wrap are not printed (they are exported). Same for MSO-created DOCX.
Marked duplicate bug 128358 has ODT attachment 155308 [details] with wrap Parallel + Contour header PNG image not printed (they are exported). Prints OK if Wrap changed to None or Optimal, Before, After. 
Duplicate bug 132364 has DOCX attachment 159873 [details] (regardless it's 2007, same if resaved) that prints none of Tight wrap JPG images and doesn't PDF export some (where caption starts with 'Becher'). Noted that images, which have got style "fr1" will be printed, but all images, which have got style "fr2", "fr3" and "fr4" will not print. Also NOK with Wrap change in LO. OK with wrap change in MSO. 
Bug 138115 has DOCX attachment 167171 [details] with Tight wrap PNG images seen in LO with wrap Parallel + Contour, images not printed nor exported to PDF. Also NOK with wrap change in LO. OK with wrap change in MSO.

Based on all this, I change the title from "JPG images" to "images with specific wrap" (thanks to bug 138115).
Print and Export are not always the same, but we should keep all here. 

Print bug already seen in File-Print preview (not in Print Preview).
Repro 7.1+. Also in Linux so All OS.
Comment 18 Timur 2020-11-16 06:54:29 UTC
*** Bug 137056 has been marked as a duplicate of this bug. ***
Comment 19 Timur 2020-11-27 06:59:07 UTC
*** Bug 138515 has been marked as a duplicate of this bug. ***
Comment 20 BogdanB 2021-01-17 18:14:50 UTC
*** Bug 139639 has been marked as a duplicate of this bug. ***
Comment 21 Timur 2021-02-19 10:40:38 UTC
*** Bug 140426 has been marked as a duplicate of this bug. ***
Comment 22 Timur 2021-02-19 10:47:00 UTC
Hi Armin, I  noticed you are back here after a long time. I hope you're well and fine. 
I see you're working on some other bugs but please note this one is critical,when Print nor Export don't work. 
I asked before for a revert, nor knowing about that fix, but it seems much less problematic than this one.
Comment 23 Armin Le Grand (allotropia) 2021-02-22 11:37:31 UTC
Hi Timur,
reverting would re-introduce tdf#114076, also bad.
The code is correct, but a complex PolyPolygon as used here may lead to problems in print(?) output...
Is there a simplified bugdoc with just one image or so...?
Comment 24 C.R. 2021-02-22 11:50:23 UTC
Created attachment 169960 [details]
Coverpage - Image left corner not printed properly
Comment 25 Armin Le Grand (allotropia) 2021-02-25 15:38:39 UTC
Loaded doc,
- Print Preview -> OK
- Export PDF -> OK
- PrintToFile (also PDF, but using printer) -> OK

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 7ba76115b0e3baefae0ede66848f4340c7c7401b
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Could not reproduce, what do I need to do..?
Comment 26 Armin Le Grand (allotropia) 2021-02-25 16:07:08 UTC
Same using

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3836c43963af1c99bcb9f9ab20f745d29b8c80fc
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL
Comment 27 Timur 2021-02-26 15:39:50 UTC
Armin, if you prefer a single image file with no other text, please see ODT attachment 169775 [details] (dupl. bug 140426). Comment 24 attachment is another issue, not this bug.  
Print bug already seen in File-Print preview (not in Print Preview)!

Main bug 129085 has DOC attachment 156171 [details] where 3 bottom JPG images with Tight wrap are not printed (they are exported). Same for MSO-created DOCX.
Marked duplicate bug 128358 has ODT attachment 155308 [details] with wrap Parallel + Contour header PNG image not printed (they are exported). Prints OK if Wrap changed to None or Optimal, Before, After.
Duplicate bug 132364 has 17-images DOCX attachment 159873 [details] (regardless it's 2007, same if resaved) that prints *none* of Tight wrap JPG images and doesn't PDF export some (where caption starts with 'Becher'). Noted that images, which have got style "fr1" will be printed, but all images, which have got style "fr2", "fr3" and "fr4" will not print. Also NOK with Wrap change in LO. OK with wrap change in MSO.
Bug 138115 has DOCX attachment 167171 [details] with 2 Tight wrap PNG images seen in LO with wrap Parallel + Contour, images not printed nor exported to PDF. Also NOK with wrap change in LO. OK with wrap change in MSO.
Duplicate bug 139639 has ODT attachment 168908 [details] with JPG image and some text, image not printed nor exported to PDF.
Duplicate bug 140426 has ODT attachment 169775 [details] with a single PNG image and no text.
Comment 28 Armin Le Grand (allotropia) 2021-02-26 17:04:43 UTC
Hi Timur - thanks a lot, I *did* mix up print/Preview with the Preview in the Print-Dialog. Indeed, there it *is* missing.
Can now reproduce using 'attachment 169775 [details]' in Print dialog preview *and* missing in Print_to_file -> PDF, too. Will take a look...
Comment 29 Xisco Faulí 2021-03-11 12:17:41 UTC
(In reply to Armin Le Grand from comment #28)
> Hi Timur - thanks a lot, I *did* mix up print/Preview with the Preview in
> the Print-Dialog. Indeed, there it *is* missing.
> Can now reproduce using 'attachment 169775 [details]' in Print dialog
> preview *and* missing in Print_to_file -> PDF, too. Will take a look...

Hi Timur, Armin,
This should fix this issue < https://gerrit.libreoffice.org/c/core/+/112340 > since the commit introducing this issue would be reverted...
Comment 30 Xisco Faulí 2021-03-11 13:06:42 UTC
(In reply to Xisco Faulí from comment #29)
> (In reply to Armin Le Grand from comment #28)
> > Hi Timur - thanks a lot, I *did* mix up print/Preview with the Preview in
> > the Print-Dialog. Indeed, there it *is* missing.
> > Can now reproduce using 'attachment 169775 [details]' in Print dialog
> > preview *and* missing in Print_to_file -> PDF, too. Will take a look...
> 
> Hi Timur, Armin,
> This should fix this issue < https://gerrit.libreoffice.org/c/core/+/112340
> > since the commit introducing this issue would be reverted...

I've also added a unittest in https://gerrit.libreoffice.org/c/core/+/112342
Comment 31 Xisco Faulí 2021-03-11 13:08:40 UTC
*** Bug 139124 has been marked as a duplicate of this bug. ***
Comment 32 Xisco Faulí 2021-03-11 13:09:14 UTC
*** Bug 126313 has been marked as a duplicate of this bug. ***
Comment 33 Xisco Faulí 2021-03-11 13:10:34 UTC
*** Bug 138515 has been marked as a duplicate of this bug. ***
Comment 34 Timur 2021-03-11 14:59:59 UTC
Xisco, congrats and thanks for test. 
I wish it was sooner, per Comment 15. 
Really visible, will you be able to backport to 7.0?
Comment 35 Commit Notification 2021-03-12 14:34:58 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f4f6ec04544059910ab5ec47817fad2287dd3f5a

tdf#129085: vcl_pdfexport: Add unittest

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 36 Xisco Faulí 2021-03-12 14:41:38 UTC
The commit causing this issue has been reverted in https://cgit.freedesktop.org/libreoffice/core/commit/?id=2e334998f4a821ea05ce25dc6346b556bcb1347b

Please, test it with a daily build.
Comment 37 Timur 2021-03-16 15:07:45 UTC Comment hidden (obsolete)
Comment 38 Julien Nabet 2021-03-16 18:03:02 UTC Comment hidden (obsolete)
Comment 39 Julien Nabet 2021-03-16 18:13:31 UTC
(In reply to Julien Nabet from comment #38)
> (In reply to Timur from comment #37)
> > I tested duplicates, ok. I see backport to 7.1 waiting for review. 
> > Julien, if you see this, can you put +1?
> > Hoping for backport to 7.0
> 
> Backport for 7.1 already merged, see
> https://gerrit.libreoffice.org/c/core/+/112398

For backport 7.0, I put Armin and Caolán in cc since they had already approved 7.1 backport.
Anyway at worst, there's only 7.0.6 remaining for 7.0 branch according to https://wiki.documentfoundation.org/ReleasePlan/7.0
Comment 40 Timur 2021-03-17 07:05:42 UTC
thanks Julien for all. 
When I asked, I saw it waiting for a few days, and this is the last period to backport to 7.0.
I guess there are folks like me, who use Still.Last for work so it's important to have this in 7.0.6.
I encountered this bug few times, was annoying.