Bug 96431 - PDF and PRINTING Problem, PNG with alpha transparency on LXDE based UI
Summary: PDF and PRINTING Problem, PNG with alpha transparency on LXDE based UI
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.1.0.0.beta1
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: needs:LXDE
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-12-12 02:55 UTC by Viruch Hemapanpairo
Modified: 2016-04-07 11:53 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
The sample file with 2 different background (685.04 KB, application/vnd.oasis.opendocument.text)
2015-12-12 02:55 UTC, Viruch Hemapanpairo
Details
The result of 2 image with different background (566.77 KB, application/x-octetstream)
2015-12-12 02:56 UTC, Viruch Hemapanpairo
Details
a Draw version of the test document (684.21 KB, application/vnd.oasis.opendocument.graphics)
2015-12-12 16:23 UTC, V Stuart Foote
Details
a version of the test document with page backgrounds so issue of PNG area fill and transparency are more obvious (364.21 KB, application/vnd.oasis.opendocument.text)
2015-12-12 16:25 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Viruch Hemapanpairo 2015-12-12 02:55:37 UTC
Created attachment 121234 [details]
The sample file with 2 different background

LibreOffice 5.1.0 beta2 cannot handle the .PNG file format with trasparency background properly when print or export as .pdf file

version : Version: 5.1.0.0.beta2+
Build ID: 68111c6b8b3d827dba7b35e1b7c84d1bdddd47d6

Repoduce Process:
1. Insert .png woth transpareency backgroud onto the document
2. Export the document as .pdf ot just print it out.

Symtoms:
The .png image cannot be exported or printed out as it should be compare to the same image with white background.
Comment 1 Viruch Hemapanpairo 2015-12-12 02:56:18 UTC
Created attachment 121235 [details]
The result of 2 image with different background
Comment 2 V Stuart Foote 2015-12-12 03:30:21 UTC
OK, thanks for filing.  Confirming this issue.

Please identify your Linux build and DE in use. Also, how does the export to PDF, or print behave when you disable OpenGL support:

from Tools -> Options -> View:  uncheck "Use OpenGL support for all rendering"?


When I export from Windows 10 Pro with
Version: 5.0.3.2 (x64)
Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb75
Locale: en-US (en_US) 5.0.3.2

with OpenGL enabled--I reproduce the issue.

with OpenGL disabled as above--the PDF is produced with both images visible.

Resolving as Duplicate of bug 94851

*** This bug has been marked as a duplicate of bug 94851 ***
Comment 3 Viruch Hemapanpairo 2015-12-12 10:06:28 UTC
Thanks for your information. I'm using Lubuntu 14.04.3 with LXDE as my desktop environment which the OpenGL is not activated by default. Anyhow, the problem won't occur in LibreOffice 4.4.7 and LibreOffice 5.0.3 on the same machine.
Comment 4 V Stuart Foote 2015-12-12 16:21:21 UTC
@Viruch, 

Apologies I closed as duplicate too quickly.  Forgot about your filing of bug 93610

Hmm, I just checked on Fedora 22 LXDE spin with
Version: 5.1.0.0.beta2
Build ID: 53054959a12edc6510f51b94ddc9b73d27aedaf6
Thread 2; Ver: 4.2; Render: GL;

Locale: en-US (en_US.UTF-8)

--No-OpenGL--

1. confirm OpenGL is disabled--Tools -> Options -> View: "Use OpenGL for all rendering" is **unchecked** 

2. Cleared all options and set "Lossless compression" on the File -> Export as PDF: PDF export panel.

with OpenGL disabled, receive a clean PDF export with both images fully formed.

--OpenGL rendering enabled--

1. checkbox on Tools -> Options -> View: "Use OpenGL for all rendering is checked -- restart LibreOffice to enable OpenGL

2. cleared all options and set "Lossless compression" on the File -> Export as PDF: PDF export panel.

with OpenGL enabled, the exported PDF shows corrupted images in attachment 121235 [details]

2. cleared all options on the PDF

with OpenGL enabled the background fill image is lost in Writer, and when exported to PDF *both* the PNG mages are corrupted as in attachment 121235 [details]

So two issues here--the OpenGL issue which mishandles the PNG, and LXDE handling of PNG which I can not confirm.

Will attach a different take on your MrZ Writer and Draw for you to test against.
Comment 5 V Stuart Foote 2015-12-12 16:23:42 UTC
Created attachment 121242 [details]
a Draw version of the test document
Comment 6 V Stuart Foote 2015-12-12 16:25:03 UTC
Created attachment 121243 [details]
a version of the test document with page backgrounds so issue of PNG area fill and transparency are more obvious
Comment 7 V Stuart Foote 2015-12-12 16:26:26 UTC
@Viruch,

Please work with the attached Draw and Writer ODF documents, check the behavior of the PNG both on export to PDF, and when OpenGL is set active.

Thanks.
Comment 8 Viruch Hemapanpairo 2015-12-14 00:32:34 UTC
@VStuart

Thanks for your concern. Just put the attached file to test on
OS : Lubuntu 14.04.3
LO : Version: 5.1.0.0.beta2+
     Build ID: 68111c6b8b3d827dba7b35e1b7c84d1bdddd47d6

1. If OpenGL enabled : The images on exported PDF is fully formed.
2. If OpenGL is disabled : The images will be corrupted in exported PDF.

That's quite the opposite with your test??

Anyhow there's some point which I may not clarify. The 2 images in the attachement 121234 are different version, transpareant and white background, as seeting the background of the image inside of LO can't solve this defect.

Another pont is that, Lubuntu may disable the OpenGL by default (I guess), enbling the OpenGL in LO options shows some observably slow rendering. And importantly, LO will be crashed when I try to flip the images (which is worse than what I've reported in bug 93610) id OpenGL is enabled.

Awaiting the new built version to test these 2 bugs again. Thank you.
Comment 9 Viruch Hemapanpairo 2015-12-17 09:23:16 UTC
Testing the 3 newly built versions:

Version: 5.0.5.0.0+
Build ID: 58c8f4dc6c7d6897e36c0c754162035f70e3385f
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-5-0, Time: 2015-12-16_07:06:49
Locale: en-US (en_US.UTF-8)

Version: 5.1.0.1.0+
Build ID: 3b31d0dc86d75f8283951f3fd6a4f48ff649ed99
Threads 4; Ver: Linux 3.13; Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:libreoffice-5-1, Time: 2015-12-16_10:55:13
Locale: en-US (en_US.UTF-8)

Version: 5.2.0.0.alpha0+
Build ID: 0db3361527f799be6cadf5bedb8a37976fb0a39d
CPU Threads: 4; OS Version: Linux 3.13; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2015-12-16_11:47:30
Locale: en-US (en_US.UTF-8)

These all version produce the same defected pdf file. While the stable version (Version: 4.4.7.2 Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600 Locale: en_US.UTF-8) can produce a perfect result.
Comment 10 Andrew Kornilov 2016-01-28 16:35:16 UTC
Confirm the same problem on Linux, LO version 5.0.5.1  x86_64
and Linux LO version 5.1.0.2 x86_64.

That happens not only with export to PDF, but with printing to any PostScript printer directly from ODT.
Comment 11 V Stuart Foote 2016-01-28 17:27:25 UTC
(In reply to Andrew Kornilov from comment #10)
> Confirm the same problem on Linux, LO version 5.0.5.1  x86_64
> and Linux LO version 5.1.0.2 x86_64.
> 
> That happens not only with export to PDF, but with printing to any
> PostScript printer directly from ODT.

Are we correct to assume that you are on a Linux LXDE desktop?
Comment 12 Andrew Kornilov 2016-01-28 20:10:31 UTC
(In reply to V Stuart Foote from comment #11)

> 
> Are we correct to assume that you are on a Linux LXDE desktop?

Sorry, didn't read the bug carefully.  Actually, i wanted to report a bug about PNG with transparency and found this one. So i just confirmed the problem exists on any Linux from default RPM builds (i got them here: http://download.documentfoundation.org/libreoffice/testing/)
Comment 13 Steve Murphy 2016-02-11 10:32:34 UTC
Hi All,

I can reproduce this on 5.1.0.2 on a vanilla Ubuntu 15.10 (so not just LXDE).

This is a regression (I have added the keyword).  On the same, system both LO 4.3.3.1 and LO 5.0.2.2 do not suffer from this issue.

Again, I see that the issue is present when I export to PDF via LO or Print to a PDF printer.  In fact, printing to a PDF printer seems worse than exporting direct form LO.

Let me know if you need anything else.

Regards,

Steve
Comment 14 Viruch Hemapanpairo 2016-02-18 03:14:17 UTC
Dear All,

It happens to be that this bug was already solved in the newly built of developed version of 2016.02.17. Thanks for your all kind efforts.

OS : Lubuntu 14.04.3
DE : LXDE

Version: 5.1.2.0.0+
Build ID: 398fcdd3abcab3dbd0418dbae87ed4ca7451315c
CPU Threads: 4; OS Version: Linux 3.13; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:libreoffice-5-1, Time: 2016-02-17_17:23:32
Locale: en-US (en_US.UTF-8)

Version: 5.2.0.0.alpha0+
Build ID: a3c70e760fa4203b7e6692f82d1d8a14214af3da
CPU Threads: 4; OS Version: Linux 3.13; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2016-02-17_23:47:57
Locale: en-US (en_US.UTF-8)
Comment 15 pasqual milvaques 2016-04-07 11:39:46 UTC
Closing as @Viruch indicates that he bug is resolved, I have done a quick check and for me also works in lubuntu 15.10