Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVG : Ungroup objects / remove transform from command line

Here is an SVG file with some path :

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0"
    ... viewBox="0 0 1920.000000 1080.000000">
    <g transform="translate(0.000000,1080.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
        <path d="M16320 10788 c0 -5 132 -7 293 -6 293 2 259 6 -101 10 -105 2 -192 0
-192 -4z"/>
 <!-- Many other paths -->

I want to extract the paths data within the 1080x1920 reference frame. The translation and scaling have to be considered before extracting path data.
I currently use the Ungroup option in Inkscape before extracting all paths.
How to do it automatically (via command line or programm) ?

like image 890
Noan Cloarec Avatar asked Oct 27 '25 23:10

Noan Cloarec


1 Answers

You can run Inkscape actions from the command line

inkscape --actions "select-all:groups; SelectionUnGroup; export-filename: output.svg; export-plain-svg; export-do;" intput.svg
like image 109
Igor Mikushkin Avatar answered Oct 31 '25 09:10

Igor Mikushkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!