Closed Fadiabb closed 5 years ago
And you found another bug... This pretty much looks like empty clipPaths break the graphics state stack, which means that our top-level change of basis matrix is still active after svg2pdf/jsPDF's advancedAPI mode. Another reason might be an invalid matrix (e.g. with NaNs) created by the clipPath. We are open for pull requests ;)
The workaround is simple: just remove any empty clip paths beforehand.
Describe the bug When
<clip-path>
element is empty comes to rendering of rotated text on pdf during the use of jspdf.Text() after the call of svg2pdf() version: 38f10d329807d2a671e78695a4504dc3ebbb7a33To Reproduce Adding text via jsPDF.Text() after the svg2pdf() function will render rotated text if there is by
<svg>
element an empty<clip-path>
elementExpected behavior Render the text in right way
Screenshots the rendered text on pdf:
Commenting out the
<!-- <rect x="10" y="30" width="20" height="20"></rect> -->
in the code will render the text correctly