export clipped paths to ps/eps or pdf fails

Bug #168800 reported by Drebon17
66
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned

Bug Description

If you have a drawing done in inkscape using clippathes, then by
exporting it to ps/eps or pdf you will just loose the clipping, and having
the two shapes (the clippath and the path clipped) entirely displayed.

     This issue is very likely to be due to a lack of support for clipping
in the ps eps or pdf format (or maybe a misuse of that support by InkScape
export function). In some cases one can use the "path, cut the pathes"
option and deleted the unwanted parts to achieve the same result as
"object, clipping, define", and that does export well (but that's because
the paths are actually redifined and one lost the trace of the cutting
path).

    I do belive that a fix to that issue could be to tranform the clipping
into an actual cutting when exporting to pdf/eps/ps.

Here is couple of files showing the issue :

a black square is being cut by a triangle, on the svg everything is fine,
and on the eps, one can only see the black square.

Tags: exporting
Revision history for this message
Drebon17 (drebon17) wrote :
Revision history for this message
Drebon17 (drebon17) wrote :

Originator: YES

here is the eps file created by export of the svg
File Added: clippingbug.eps

Revision history for this message
Bug Importer (bug-importer) wrote :

Same problem for:

<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
 width="1800" height="1200" id="Flag of Greenland">
<g fill="#d00c33"><!-- red -->
  <rect height="600" width="1800" y="600" id="lower red field" />
  <g fill="white">
    <rect height="600" width="1800" fill="white" id="upper white field"
/>
    <circle r="400" cx="785" cy="600" fill="white" id="white circle" />
  </g>
  <clipPath id="clip">
    <rect height="600" width="1800"/>
  </clipPath>
  <circle r="400" cx="785" cy="600" clip-path="url(#clip)" id="red circle
half" />
</g>
</svg>

Ryan Lerch (ryanlerch)
Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
mahfiaz (mahfiaz) wrote :

I add a example showing that also masking does not work.
The clipping and masking problem affects also images as expected.

Revision history for this message
The Amigo (7-launchpad-theamigo-net) wrote :

This sounds like the same problem I'm seeing (correct me if I'm wrong).

1) When I print from SketchUp to PDFCreator, everything looks fine.
2) When I import into Inkscape (0.46-pre1) and save as SVG, everything looks fine.
3) When I save as PDF/EPS/PS from Inkscape, the arrows turn into squares.

There is apparently a way to do it in PDF (as shown in step one), but I can't find a way to get Inkscape to save it that way.

Files showing steps 1, 2 and 3 are in the attached zip file.

Revision history for this message
tbnorth (terry-n-brown) wrote :

This applies to images (clipped with rectangles) as well as other clipped things. This is a big pain in terms of exporting for printing, I think it's more medium-high than just medium priority. Cairo knows how to clip, I'm sure.

Revision history for this message
rockstar1707 (rockstar1707-gmail) wrote :

I'm not exactly experienced in Cairo, but I'm pretty sure that it supports clipping. And it works as expected. This can be seen in brilliant python library for drawing graphs "matplotlib", which uses Cairo for rendering. Thus, it can export to SVG, EPS, PDF etc. However, I'm attaching PNG, SVG and PDF documents (graphs) made with matplotlib, where the clipping is used, and the result is really good. Maybe this can help finding "problematic" code which causes problems with clipping in Inkscape PDF export.

BTW, could it be, that this is not working yet, because not the whole rendering is converted to Cairo? And further on, I guess this means that maybe we can expect this to work, when the transition to Cairo is done.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

now works in svn

Changed in inkscape:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.