In the document I found that SVG files can be exported, but there is no information of Import. How can I do that?
This is not currently supported by the built-in functions, but there is a function called
SVGImport in the function repository that can do this:
Alternative answer: Use the SVG importer from my Prototypes paclet:
To install the paclet, run this command:
Note that this paclet has many many functions, but you may be able to extract just the SVG importer if that's all you need.
After that you can load the package:
Normally this package autoloads when you use a function from the package, but not in this case which uses
Import to import the SVG file (example source):
Important note: This implementation uses the Apache-Batik java library and imports the SVG as a raster image and not as a graphics object. So you lose the scalability of the SVG. On the other hand, this implementation does a very faithful rendering of SVG file (exceeding, in certain cases, the result from the SVGImport resource function (which works well in a lot of cases too).