SVG-to-PDFKit
SVG-to-PDFKit copied to clipboard
Shadow, text Underline and text Opacity Issue when Export Fabric Canvas as PDF.
I am using fabric js and Shadow, text Underline and text Opacity Not display in generated pdf file.
Shadows are not implemented. Text underline and text opacity should display, so it is probably a bug. Can you attach a sample svg?
Shadows are not implemented. Text underline and text opacity should display, so it is probably a bug. Can you attach a sample svg?
I have the same problems with opacity and underline.
this is my random example: https://jsfiddle.net/GranGabrio/xdu624wp/1/
+1 😭
it seems like the tspan
element didn't receive the style from its parent text
, so if you just set opacity on the text
, it won't work.
if your svg structure is like below, it won't work fine with opcacity
and underline
.
<text xml:space="preserve" font-family="Crimson Text" font-size="39.82875000000001" font-style="normal" font-weight="bold" style="stroke: none;stroke-width: 1;stroke-dasharray: none;stroke-linecap: butt;stroke-dashoffset: 0;stroke-linejoin: miter;stroke-miterlimit: 4;fill: rgb(0,0,0);fill-rule: nonzero;white-space: pre;" opacity: 0.32179899999999995">
<tspan x="-52.37" y="12.51" style=" >thujgf</tspan>
</text>