rsvg-convert generates incorrect pdf for open paths with aligned ends

Bug #1183360 reported by Robin Tregaskis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
librsvg (Ubuntu)
New
Undecided
Unassigned

Bug Description

Create a simple svg with an open ended path e.g. '[' shape:

<svg version="1.1" width="420mm" height="297mm" viewBox="0 0 420 297" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path stroke-width="1" stroke="red" fill="none" d="M5,5 L25,5 L25,30 L5,30"/>
</svg>

Pass through rsvg-convert with following options:
> rsvg-convert -f pdf -o bug.pdf bug.svg

observe pdf renders image as a closed box.

The same thing happens if I use imkscape to do the conversion (I am led to believe that Inkscape uses librsvg2 under the hood?)
> inkscape bug.svg --export-pdf=bug.pdf

I have librsvg2 version 2.36.1-0ubuntu1 on Ubuntu 12.04 LTS

$ uname -a
Linux destroyer 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Robin Tregaskis (robint-5) wrote :
Revision history for this message
Robin Tregaskis (robint-5) wrote :

example broken pdf

Revision history for this message
random (jskosbjyrxqo) wrote :

I've experienced an issue with arrows pointing the wrong way after conversion. I guess its related. As a workaround in inkscape the arrow needs a direction set for its curve.

1. Select the path and the "Edit paths by nodes" tool (F2), or double click on the path.
2. While holding Shift, drag the arrow's node to give it a "smooth node handle" (at least this is what its called in the status bar). This only works if the node doesn't already have a "smooth node handle", otherwise the node is just moved.

The handle can be dragged and snapped exactly over its node (the arrow's head) which I guess causes the converter to choose a default +X direction.

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.