Bug 149637 - Transparency of background image does not export to PDF when viewed in macOS Preview
Summary: Transparency of background image does not export to PDF when viewed in macOS ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2022-06-20 11:57 UTC by Pablo
Modified: 2023-03-31 18:56 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Libreoffice writer file with a background image (702.49 KB, application/vnd.oasis.opendocument.text)
2022-06-21 07:42 UTC, Pablo
Details
Pdf exported on Mac (367.10 KB, application/pdf)
2022-06-22 08:07 UTC, Pablo
Details
Comparison of PDF and ODT (597.25 KB, image/png)
2022-06-22 18:12 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo 2022-06-20 11:57:06 UTC
Description:
The problem I found is that when I try to export a document with a background image with transparency set, I get a pdf with a background that is not transparent. 

Steps to Reproduce:
1.Set a background image with transparency
2.Try to export as pdf
3.

Actual Results:
The image is not transparent

Expected Results:
A pdf with a background image with transparency


Reproducible: Always


User Profile Reset: No



Additional Info:
The pdf should get the background with the percentage of transparency set in the page style
Comment 1 Rafael Lima 2022-06-20 23:05:36 UTC
Hi Pablo, thanks for reporting.

First, let us know which version of LibreOffice you're using. Copy and paste the info under Help - About LibreOffice.

Do you have a sample file so we can test?

Note that you reported this as a Writer bug, but Writer currently does not support setting transparency for images. See bug 137214 for more info.

Maybe you have a DOCX file created in MS Word and you're opening it in Writer and exporting to PDF?
Comment 2 Pablo 2022-06-21 07:42:06 UTC
Created attachment 180861 [details]
Libreoffice writer file with a background image
Comment 3 Pablo 2022-06-21 07:44:04 UTC
It happens in libreoffice writer for mac (intel version). Version of libreoffice: 7.2.7 (it also happens in the newer version 7.3.4).

The same file opened on windows works well, and the background is exported correctly in pdf, but in the mac version the transparency of the background does not work.

I attach the document I am working with, but the bug just happens on mac, not on windows as I said before.
Comment 4 QA Administrators 2022-06-22 03:45:53 UTC Comment hidden (obsolete)
Comment 5 Pablo 2022-06-22 08:07:25 UTC
Created attachment 180891 [details]
Pdf exported on Mac

You can see that the transparency of the background image is completely lost. It is set to 80%, and however it looks like there's no transparency.
Comment 6 Rafael Lima 2022-06-22 18:12:06 UTC
Created attachment 180915 [details]
Comparison of PDF and ODT

(In reply to Pablo from comment #5)
> You can see that the transparency of the background image is completely
> lost. It is set to 80%, and however it looks like there's no transparency.

Hi Pablo, I opened this PDF on my machine and it has transparency, as well as the ODT file. See attached image showing how the PDF (left) and ODT (right) open on my machine.

Can you try a different PDF reader? Maybe open it on your browser to test if the problem is with the PDF reader you're using.

I am using LO 7.3.4 and Firefox on Linux.
Comment 7 Pablo 2022-06-23 07:43:14 UTC
Hello Rafael, first of all thank you very much for your help. I opened the file in a different pdf reader and, as you said, it looks like everything is fine.

The problem seems to be in the default program that macOs has to open pdf (called preview). I don't know why it reads the pdf without transparency. It just happens in pdfs exported from libreoffice. I tried in a pdf from adobe illustrator and it shows transparency correctly. 

Is it possible that libreoffice writer exports pdfs in a special way that makes this happen? Or it may be the preview software from Apple? It wouldn't be the first time Apple do things a little bit different and as a result they cause havoc among users.

Thanks to all in advance
Comment 8 Rafael Lima 2022-06-23 15:32:00 UTC
Indeed this seems to be a problem specific to macOS Preview. I added the appropriate tags to this bug report.
Comment 9 eisa01 2023-03-31 18:56:41 UTC
Can confirm, Preview does not understand the transparency while Acrobat Reader does

No clue if this is a bug in LO or Preview though

Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 1:7.0.4-4+deb11u4
Calc: threaded