[Libreoffice-bugs] [Bug 108726] inserted PDF images lose transparency in 5.4
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Oct 28 19:43:39 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=108726
--- Comment #16 from sergio.callegari at gmail.com ---
To clarify, this bug is about /import/ of PDF into LibO, not /export/ from
LibO.
To get the issue relevance it is better to first make an example that does not
use PDF images. Suppose that you are preparing a slide and you have a red
background or some background objects. If you insert on it a bitmap image with
some lines on a transparent background, you will see just those lines on the
background elements of the slides. However if you insert an image with a
non-transparent background (e.g. white), your slide will look ugly, because
you'll get a big white box with the lines overlapped covering your slide
background or your background objects.
Same goes with PDF, but with some difference because this is a vector format.
Rather than having a transparent background, in PDF you typically have no
background at all, you just have the data about the foreground objects (e.g.
the lines). When you import a PDF image with some lines and no background into
a slide with a red background or some background elements, you expect to see
just the lines on the background, not a big white box with the lines covering
all the background elements.
The problem is in the way in which recent LibO treats PDF by first transforming
it into a bitmap for visualization. When the PDF has no background, rather than
creating a bitmap with a transparent background, a bitmap with a white
non-transparent background is created. And thus you get the ugly white boxes
hiding the background elements.
There are many ways to check if a PDF image has a background or not. I think
that LibO itself is OK to make the test:
(i) take the PDF file (say the demo PDF file attached to this bug) and /open/
it with LibO, rather than /importing it as an image/ (e.g., launch 'libreoffice
demo.pdf');
(ii) go to Page->Properties and set all the margins to 0 (LibO may complain a
little, but do not worry about it)
(iii) again in Page->Properties set a solid background color (e.g., red). If
you see that color in the image, then the image has no background. In fact, the
LibO page background that is behind the image can "pass through". Conversely,
if the PDF image has a background you will see that background and the LibO
page background will not pass through.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201028/6e198178/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list