Current collected state Current
Observed since 20 Oct, 21:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
7th-setin
Required version : 0.10.22
With SVGUtils you can :
For Text and Group, the boundingbox result is not true but it's enough for basic manipulations
var Svg = require('svgutils').Svg;
Svg.fromSvgDocument(__dirname + '/test2.svg', function(err, svg){
// ...
});
var Svg = require('svgutils').Svg;
Svg.fromSvgDocument(__dirname + '/test2.svg', function(err, svg){
if(err){
throw new Error('SVG file not found or invalid');
}
var json = svg.toJSON();
});
var Svg = require('svgutils').Svg;
Svg.fromSvgDocument(__dirname + '/test2.svg', function(err, svg){
if(err){
throw new Error('SVG file not found or invalid');
}
svg.applyMatrix(null, function(newSvg){
console.log(newSvg.toString());
});
});
var Svg = require('svgutils').Svg,
Matrix = require('svgutils';.Matrix;
Svg.fromSvgDocument(__dirname + '/test2.svg', function(err, svg){
if(err){
throw new Error('SVG file not found or invalid');
}
// Ex : apply translate(10, 20) to all svg
svg.applyMatrix(new Matrix(1, 0, 0, 1, 10, 20), function(newSvg){
console.log(newSvg.toString());
});
});
var Svg = require('svgutils').Svg,
Matrix = require('svgutils';.Matrix;
Svg.fromSvgDocument(__dirname + '/test2.svg', function(err, svg){
if(err){
throw new Error('SVG file not found or invalid');
}
svg.save({ output : '/home/user/svg.svg' }, function(err, filename){
if(err){
throw err;
}
});
});
var Svg = require('svgutils').Svg,
Matrix = require('svgutils';.Matrix;
Svg.fromSvgDocument(__dirname + '/test2.svg', function(err, svg){
if(err){
throw new Error('SVG file not found or invalid');
}
svg.savePng({ output : '/home/user/svg.png' }, function(err, filename){
if(err){
throw err;
}
});
});
You can create SVG from DXF file. You can, as you want, get specifics DXF layers.
Svg.fromDxfFile({
path : __dirname + '/test.dxf'
}, function (err, svg) {
if(err){
throw new Error('SVG file not found or invalid');
}
// your converted svg
});
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.2Registry latest | 15 Mar 2024 | 11 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:7a0020441fd9b22e2dcad5760483dcd26f129920e095b8933c7109c8fe7fba15