You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to display SVG images with text in them in using dompdf (which depends on this library for SVG rendering). Some of my text is divided into <tspan> elements, because it is too long to be displayed in a single line. In a browser, the image is rendered correctly. In dompdf, however, the text is displayed in a single line. For example the following <text> tag:
<textx="10"text-anchor="start"class="highcharts-caption"data-z-index="4"style="color:#666666;font-size:11px;fill:#666666;"y="368">
<tspan>This is an example text. The text is too long to be displayed in a single line, so it has to be</tspan>
<tspandy="14"x="10">broken down into multiple parts using the tspan tag.</tspan>
</text>
is displayed as:
"This is an example text. The text is too long to be displayed in a single line, so it has to bebroken down into multiple parts using the tspan tag."
As you can see, the line break is ignored. "be" and "broken" end up merged together.
I used a debugger to look into how this library handles the text, and it turns out the <tspan> tag is not recognized at all. It is simply removed from the text. Which means my previous example is interpreted as:
<textx="10"text-anchor="start"class="highcharts-caption"data-z-index="4"style="color:#666666;font-size:11px;fill:#666666;"y="368">
This is an example text. The text is too long to be displayed in a single line, so it has to bebroken down into multiple parts using the tspan tag.
</text>
The <tspan> Tag is part of the SVG specification and should not be ignored by this library. Any chance for a fix?
Thank you for the support.
The text was updated successfully, but these errors were encountered:
We are also experiencing these two issues, the tspan text of our SVGs are either not at the appropriate place or their font size is too small to be readable.
Do you have an ETA on a fix please? I don't mean to be pushy, I am just trying to assess what is the best course of action for us. :)
Hello,
I am trying to display SVG images with text in them in using dompdf (which depends on this library for SVG rendering). Some of my text is divided into
<tspan>
elements, because it is too long to be displayed in a single line. In a browser, the image is rendered correctly. In dompdf, however, the text is displayed in a single line. For example the following<text>
tag:is displayed as:
"This is an example text. The text is too long to be displayed in a single line, so it has to bebroken down into multiple parts using the tspan tag."
As you can see, the line break is ignored. "be" and "broken" end up merged together.
I used a debugger to look into how this library handles the text, and it turns out the
<tspan>
tag is not recognized at all. It is simply removed from the text. Which means my previous example is interpreted as:The
<tspan>
Tag is part of the SVG specification and should not be ignored by this library. Any chance for a fix?Thank you for the support.
The text was updated successfully, but these errors were encountered: