Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Svg(str) displays a rectangle that should not be visible (zero stroke-width) #1394

@runeaam

Description

@runeaam

Describe the bug
When rendering an SVG with .Svg(str), a that has stroke-width="0" is still visible.

To [Reproduce]
Can be reproduced by passing the following SVG to .Svg(str): test.svg
You should see a rectangle surrounding the pie chart. Remove this line and the border disappears:
<rect fill="none" class="highcharts-plot-border" data-z-index="1" stroke="#cccccc" stroke-width="0" x="10" y="10" width="220" height="215" aria-hidden="true"/>

Expected behavior
I would expect the border not to be visible because the stroke-width is zero. If I load the same SVG in another image viewer there is no border visible.

Environment
What version of the library do you use? 2025.7.1
What operating system do you use? Windows x64

Additional context
My current workaround is to strip this element using Regex before passing it to QuestPDF. Would like the issue to be fixed so I can remove this hack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions