A Javascript library to export svg charts from the DOM and download them as an SVG file, PDF, or raster image (JPEG, PNG) format. Can be done all in client-side.
Hello,
I tried to export an SVG container from my website. The file is downloaded, but I cannot open it in Adobe Illustrator. I get the error This SVG is invalid. Validate before Opening. What might be the reason? The PNG export works fine.
I'm using svg-export for exporting in various formats, and, coming from the same SVG object with color #007bc4 the color in JPG is instead #017bc4. It doesn't happen when exporting a PNG or when saving the SVG, of course.
It's a very slight difference (I cannot see it with my own eyes in a well-calibrated monitor) but it's there nonetheless.
Great library! I was just wondering if you would consider hosting the script on a proper cdn like cdnjs or jsDelivr so that I could properly tag my imports with versions and benefit from their dedicated javascript caching?
I've been struggling with using this package in my React project.
I downloaded the min.js file and added it to my project. Locally all works fine, but in the container I get the following error. Attempted import error: 'downloadJpeg' is not exported from '../../svg-export.min.js' (imported as 'svgExport').
and similar, depending on the attempt.
I am sure the path is set right, import * as svgExport from '../../svg-export.min.js';
I am out of clues. It would be really appreciated if clues are given. Thank you!