SpreadJS Save PDF with SVG converts vector to raster

Posted by: martin.mayr on 28 March 2019, 8:19 pm EST

  • Posted 28 March 2019, 8:19 pm EST

    when i export a spreadsheet to pdf that has a svg image the svg vector gets converted to a raster image resulting in a blurred image.
    PDF does support embedding svg as vector.

    Export to xlsx preserves the vector, image stays sharp.

    Steps to reproduce behaviour:

    Spreadsheet, insert svg image, export to pdf, zoom

  • Replied 31 March 2019, 11:04 pm EST

    Hi Martin,
    Have you tried the PDF Export with Spread 12.0.10? We observed the SVG images exported with a little blurred.

    Please refer to the attached sample and let us know if the issue persists.

    In the case of replication, please also let us know the browser you are using and Operating system you are using.

    Manish Gupta

    Spread PDF.zip
  • Replied 1 April 2019, 3:07 am EST

    yes, we use 12.0.10
    When i insert a svg (see attachment vectorpaint) and export to pdf then i can see raster when i zoom (see svgexported)
    I used chrome and Firefox and Windows 10

  • Replied 1 April 2019, 3:26 am EST

    the svg vector should be converted to a path in the pdf, not a raster.
  • Replied 2 April 2019, 9:41 pm EST

    Hi Martin,

    Thank you, we were able to reproduce the issue at our end using an SVG Image which was different from the one that was provided by you, hence we have created an Enhancement request for this case with internal tracking id 271318.

    However, we would like to know if we missed something when we tried exporting using the image provided by you.
    Could you please look into the attached sample which uses this image and let us know if you are facing similar issues.

    Manish Gupta

    Spread PDF_VectorPaint.zip
  • Replied 21 May 2019, 1:34 am EST

    Hi Martin,
    This issue has been fixed in the latest release build 12.1.1. For exporting the SVG content to PDF, we need to get the content of the image using the callback.

    For reference, please refer to the attached sample for reference.

    Manish Gupta

    SVG To PDF.zip
  • Replied 8 August 2019, 7:31 pm EST

    SVGtoPDF.js produces a faulty pdf

    Steps to reproduce:
    Take test.svg from zip, make test.pdf

    Result: Acrobat can't diplay the pdf, Edge can't display, Chrome shows faulty, Firefox shows OK

  • Replied 11 August 2019, 4:32 pm EST

    Hi Martin,
    We are sorry for the inconvenience, we are able to replicate the issue at our end. The issue has been forwarded to the concerned team for further investigation with internal tracking id SJS-1363.

    We will let you know as we have an update on this.

    Manish Gupta
  • Replied 28 August 2019, 12:26 am EST

    Hi Martin,
    Please find the attached updated sample with updated SVGtoPDF.js file.

    Manish GuptabasicPdf_updated (1).zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels