Download it now!
Bug 96532 - Export of page with transparent PNG inserts gray line on transparency border
Summary: Export of page with transparent PNG inserts gray line on transparency border
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2015-12-16 07:25 UTC by Thomas Lendo
Modified: 2019-08-21 09:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Grey borderline at transparency edge of a PNG image, only in LibO export PDF file (87.42 KB, image/png)
2015-12-16 07:41 UTC, Thomas Lendo
Details
Example file with transparent PNG (222.25 KB, application/vnd.oasis.opendocument.text)
2015-12-22 12:08 UTC, Thomas Lendo
Details
ZIP package with SVG (original), PNG, PDF and ODT files (13.96 KB, application/zip)
2017-02-09 09:39 UTC, Thomas Lendo
Details
PDF file, created with LibreOffice 5.3.0.3 (422.23 KB, application/pdf)
2017-02-09 09:40 UTC, Thomas Lendo
Details
PDF file, created with PDFCreator 2.3.1 (50.17 KB, application/pdf)
2017-02-09 09:41 UTC, Thomas Lendo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2015-12-16 07:25:11 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier: LibreOffice 5.0.3.2

Transparent PNG images get an ugly gray borderline when exporting it with LibreOffice PDF export feature (tested with 5.x and 4.x). It seems that a color transition from color to 100% transparency causes that problem.

It does not matter which compression or graphics resolution I use in the PDF export options.

If I export the document with other programs (like PDFCreator or MS Office) there is no gray borderline. I will attach an example.

Reproducible: Always




[Information automatically included from LibreOffice]
Locale: de
Module: TextDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes


Reset User Profile?No
Comment 1 Thomas Lendo 2015-12-16 07:41:31 UTC
Created attachment 121332 [details]
Grey borderline at transparency edge of a PNG image, only in LibO export PDF file
Comment 2 Andreas B. 2015-12-19 13:10:51 UTC
Can you attach an example .odt with the .png in it, so we can reproduce it?
Thank you!
Comment 3 Thomas Lendo 2015-12-22 12:08:42 UTC
Created attachment 121495 [details]
Example file with transparent PNG
Comment 4 Tsu Jan 2016-02-09 12:23:54 UTC
I encountered the same problem under Debian. Thomas's attachment gives me a distorted image in the exported PDF too. The strange thing is that some PNG images get distorted and some not.

For me, downgrading of LibreOffice from v5.1.0 to v5.0.2 was the only way of avoiding this issue.
Comment 5 Thomas Lendo 2016-05-25 09:16:13 UTC
Andreas B.: Do you need another information?

I attached the sample document and another person confirmed the issue and commented that downgrading LibreOffice eliminates the issue.
Comment 6 QA Administrators 2016-12-07 12:43:33 UTC Comment hidden (obsolete)
Comment 7 Thomas Lendo 2016-12-07 18:33:42 UTC
With comment 5 I attached a sample file and I asked if further info is required.
Comment 8 Andreas B. 2017-02-01 19:53:27 UTC
I can confirm it, but I'm not sure if it's a LibreOffice Bug.

If you open the generated PDF with the Firefox Integrated PDF Viewer, it displays the gray Border.
With Evince the Gray border is also visible.
With chrome also.

Because of this: The bug is confirmed.

BUT:
If I save the image from PDF to a .png file from Evince (which displays the border) the image doesn't contain the border.

If I open the PDF with GIMP, there is no Gray Border.


I changed the status to NEW, as it's confirmed.

It may would be helpful also to attach a good example, e.g. from PDFCreator.
Comment 9 Thomas Lendo 2017-02-09 09:39:26 UTC
Created attachment 131029 [details]
ZIP package with SVG (original), PNG, PDF and ODT files

Andreas B.: Thanks for your investigation.

Maybe it's a bug in Inkscape's PNG export function. But it's weird that some programs do export or show a grey border and another not. LibreOffice does and only with its internal PDF export function - external PDF creators do not.

Attached in the ZIP package you will find the original Inkscape SVG file, PDF and PNG files (exported from SVG) and the Writer file with the embedded PNG file.
Comment 10 Thomas Lendo 2017-02-09 09:40:22 UTC
Created attachment 131030 [details]
PDF file, created with LibreOffice 5.3.0.3
Comment 11 Thomas Lendo 2017-02-09 09:41:51 UTC
Created attachment 131031 [details]
PDF file, created with PDFCreator 2.3.1
Comment 12 Andreas B. 2017-02-09 20:02:13 UTC
I checked the PDF files.

The PDF Created from LibreOffice contains an image with transparent background.
The PDF Created with PDFCreator contains an image with WHITE BACKGROUND!

Therefore it can also be a Problem with the PDF reader (as I tested last time, e.g. GIMP imports the PDF correctly).

So I set the JPEG export option, but LibreOffice still exports the transparent PNG as Transparent PNG.
I'm currently not sure if this a Bug or a feature (removing the transparency of an Image may look wrong, so may transparent PNGs are excluded)


This seems to be a really complicated Problem. I'm currently not sure if it's really a problem with LibreOffice...
Comment 13 QA Administrators 2018-08-28 02:42:13 UTC Comment hidden (obsolete)
Comment 14 Thomas Lendo 2019-08-21 09:21:35 UTC
I tested the files from 2015 and 2017 again and it seems that the issue does no longer occur.

Tested with Version: 6.3.0.4 (x64)
Build-ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU-Threads: 12; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-AT (de_AT); UI-Sprache: de-DE
Calc: threaded

Therefore I close the bug as worksforme (and not as notourbug).

Maybe another one can confirm the change in LibreOffice pdf export behavior.