yWorks / svg2pdf.js

A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts
MIT License
643 stars 96 forks source link

RadialGradient is not shown correctly #283

Open talentjeff opened 5 months ago

talentjeff commented 5 months ago

Describe the bug A clear and concise description of what the bug is. RadialGradient is not shown correctly in PDF jsPDF - Version 2.5.1 svg2pdf - Version 2.23

To Reproduce Steps to reproduce the behavior:

  1. Open http://raw.githack.com/yWorks/svg2pdf.js/master/index.html
  2. Paste the svg `<svg xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" xmlns:oryx="http://oryx-editor.org" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" generated="java" height="255" id="svg-canvas" oryx:signavioversion="17.10.1" version="1.1" width="150" xmlns="http://www.w3.org/2000/svg"> Post Incoming Payments Task Manage Journal Entries Task
        <g class="edge"></g>
        <g class="topchildren"></g>
        <g class="overlays stripable-element-force"></g>
    </g>

    `

  3. see the result in the pdf. RadialGradient is not shown image

Expected behavior It should look like:

image

Desktop (please complete the following information):

HackbrettXXX commented 5 months ago

You're using percentage values for the gradient attributes. These are currently not supported. Please try using pixel values and see if the issue persists.