Bug 44731 - PDF import problems with gradients and patterns
Summary: PDF import problems with gradients and patterns
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Drawing (show other bugs)
Version: 3.4.4 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: Confirmed:4.2.0.2:OSX
Keywords:
Depends on: 86211
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-12 09:34 UTC by mathog
Modified: 2014-11-12 16:26 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Problem PDF (16.12 KB, application/pdf)
2012-01-12 09:34 UTC, mathog
Details
source SVG for the problem PDF (13.61 KB, image/svg+xml)
2012-01-12 09:34 UTC, mathog
Details
Screen shot of LODraw after opening the problem PDF (20.99 KB, image/png)
2012-01-12 09:35 UTC, mathog
Details
New gradient test (PDF) (2.93 KB, application/pdf)
2014-04-26 14:52 UTC, vvort
Details
New gradient test (SVG) (4.97 KB, image/svg)
2014-04-26 14:52 UTC, vvort
Details
Clipping patch (experimental) (2.39 KB, patch)
2014-04-26 15:05 UTC, vvort
Details | Splinter Review

Description mathog 2012-01-12 09:34:18 UTC
Created attachment 55501 [details]
Problem PDF

Example PDF made by save as from Inkscape.  Looks fine in PDF viewers.  In LODraw
the gradient/pattern extends to the limits of the image.  3.5.0b2 does exactly the same thing.

This is a specific issue extracted from bug 43806
Comment 1 mathog 2012-01-12 09:34:53 UTC
Created attachment 55502 [details]
source SVG for the problem PDF
Comment 2 mathog 2012-01-12 09:35:39 UTC
Created attachment 55503 [details]
Screen shot of LODraw after opening the problem PDF
Comment 3 mathog 2012-01-20 11:01:32 UTC
Problem is unchanged in 3.5.0rc1 on Windows
Comment 4 tester8 2012-01-20 14:04:01 UTC
Reproduced with

LOdev 3.5.0beta3
e40af8c-10029e3-615e522-88673a2-727f724
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI
Comment 5 foss 2014-01-21 10:36:28 UTC
Confirmed:4.2.0.2:OSX

OS > All
Comment 6 vvort 2014-04-26 14:52:03 UTC
Created attachment 98038 [details]
New gradient test (PDF)

Two types of bugs are mixed in provided test PDF (gradient.pdf): clipping and opacity.
Here is the new test files: gradient_test4.svg and gradient_test4.pdf
They are free from opacity bugs (and from big black rectangles as well).
Comment 7 vvort 2014-04-26 14:52:43 UTC
Created attachment 98039 [details]
New gradient test (SVG)
Comment 8 vvort 2014-04-26 15:05:58 UTC
Created attachment 98040 [details] [review]
Clipping patch (experimental)

Clipping must be performed without modifying of source objects.
But there is no such feature in LibreOffice Draw.
I have tried to implement modifying clipping.
But I was faced with two problems:
1. Radial gradients rendered by poppler as 256 polygons with 400 points.
That is bad for performance, but when clip is applied, situation becomes even worse.
2. Function basegfx::tools::clipPolyPolygonOnPolyPolygon() behaves badly in border cases. With my test file it fails 2 times: with radial gradient clipping and with pattern fill clipping.
Here is my experimental patch file.
Maybe it will be useful for someone.
Comment 9 vvort 2014-11-12 16:17:44 UTC
Bug 86211 contains newer version of clipping patch


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.