Bug 86211 - PDF Import: clipping is not implemented
Summary: PDF Import: clipping is not implemented
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
: 79043 92185 101372 145382 (view as bug list)
Depends on: 84032
Blocks: 44731 45065 82262 85428 PDF-Import-Draw 51951 79047
  Show dependency treegraph
 
Reported: 2014-11-12 16:07 UTC by vvort
Modified: 2024-03-19 23:58 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Clipping patch v2 (5.18 KB, text/plain)
2014-11-12 16:07 UTC, vvort
Details
pg15 of attachment 126650 from dupe tdf101372 (823.90 KB, application/pdf)
2018-12-16 15:30 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vvort 2014-11-12 16:07:39 UTC
Created attachment 109354 [details]
Clipping patch v2

PDF format contains a feature, called clipping.
Some parts of an objects can be masked using special clip polygon.
This feature is widely used in gradients, for example.
Gradient is drawn in rectangular area, then clipped by containing polygon.

There is no equivalent of this feature in LO.Draw.
But it can be emulated using polygon intersections.
Here is my patch with such implementation.

But before applying this change, some problems needs to be solved:
1.
Import of radial gradients produces polygons with hundreds of vertices.
Applying additional intersect operations to them produces noticable slowdown.
Maybe using bezier splines in such case will be a good solution.
2.
Intersect operation works bad in some cases, producing inacceptable result.
Bug 84032 is certainly needs to be fixed, but maybe there are some more bugs.
Comment 1 V Stuart Foote 2014-11-12 16:47:30 UTC
@vvort, *,

Confirming. This work on the PDF import filter is overdue.
Comment 2 ZioTibia81 2014-11-12 16:52:58 UTC
Could be that Bug 75314 is partially related to this bug?
Comment 3 vvort 2014-11-13 06:17:07 UTC
Bug 75314 is also the result of unimplemented clipping, but in SVG import code.
But I can't test it due to Bug 77268 - svg files fails to open with my build of LO.
Comment 4 QA Administrators 2016-01-17 20:04:43 UTC Comment hidden (obsolete)
Comment 5 ZioTibia81 2016-01-18 10:59:15 UTC
Bugs 75314 and 96635 still on Libreoffice 5.0.4.2, they are related to this bug.
Comment 6 sam tygier 2016-02-19 14:10:52 UTC
*** Bug 92185 has been marked as a duplicate of this bug. ***
Comment 7 Heiko Tietze 2016-05-10 09:30:27 UTC
*** Bug 79043 has been marked as a duplicate of this bug. ***
Comment 8 V Stuart Foote 2016-08-04 14:58:15 UTC
@Armin -- do you have any interest/cycles for working on this and related bug 90168--both seemingly dependent on bug 84032?

Were clipping masks already addressed in object work for aw80?
Comment 9 V Stuart Foote 2016-08-08 02:19:10 UTC
*** Bug 101372 has been marked as a duplicate of this bug. ***
Comment 10 E.Mi 2016-08-10 18:07:25 UTC
Is this pdf on page 1 the same bug?
https://kas.pr/a9sn
Comment 11 V Stuart Foote 2016-08-10 20:51:43 UTC
(In reply to ekari from comment #10)
> Is this pdf on page 1 the same bug?
> https://kas.pr/a9sn

Looks like it...
Comment 12 E.Mi 2016-08-11 06:22:35 UTC
I need a yes or no because I don't want to open another bug just to find out it is another duplicate
Comment 13 vvort 2016-08-11 06:43:57 UTC
Yes, it's a clipping problem.
But it can't be fixed with my patch, because in this case clipping is applied to image.
Comment 14 E.Mi 2016-08-11 06:49:29 UTC
Ok, but no need for me to open a bug report then?
Comment 15 vvort 2016-08-11 06:53:38 UTC
No need, it is better to discuss clipping problems here.
Comment 16 E.Mi 2016-08-13 08:00:18 UTC
This pdf, the transparency issue on first page is clipping problem?
http://www.newtec.eu/frontend/files/userfiles/files/Whitepaper%20DVB_S2X.pdf
Comment 17 vvort 2016-08-14 05:28:01 UTC
No, this problem is related to missing blending modes support (bug 93200).
Comment 18 Armin Le Grand 2016-09-29 08:32:16 UTC
No, was not yet adressed in aw080
Comment 19 QA Administrators 2017-10-23 14:15:32 UTC Comment hidden (obsolete)
Comment 20 ZioTibia81 2017-10-23 14:52:04 UTC
Still in 5.4.2.2
Comment 21 QA Administrators 2018-12-16 03:50:43 UTC Comment hidden (obsolete)
Comment 22 V Stuart Foote 2018-12-16 15:30:26 UTC
Created attachment 147604 [details]
pg15 of attachment 126650 [details] from dupe tdf101372

Issues with a clip mask for PDF io import remain. The pdfium based insert as image does handle clip mask correctly.

On Windows with
Version: 6.1.4.2 (x64)
Build ID: 9d0f32d1f0b509096fd65e0d4bec26ddd1938fd3
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: en-US (en_US); Calc: CL

and also current master/6.3.0

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-12-12_03:38:09
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 23 QA Administrators 2020-12-16 03:57:41 UTC Comment hidden (obsolete)
Comment 24 ZioTibia81 2020-12-16 08:55:26 UTC
Still in:

Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 24; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); Interfaccia utente: it-IT
Calc: threaded
Comment 25 V Stuart Foote 2021-10-29 16:28:54 UTC
*** Bug 145382 has been marked as a duplicate of this bug. ***