Friday, August 14, 2015

Exporting SVG to different formats

Trick source
Use Inkscape for this (from the command line):
  • export to bitmap (png)
    
    $ inkscape -f FILENAME.svg -e FILENAME.png
    
    
    loads FILENAME.svg and exports it to FILENAME.png
    
    $ inkscape -f FILENAME.svg -w WIDTH -h HEIGHT -e FILENAME.png
    
    
    loads FILENAME.svg and exports it to FILENAME.png with width size, WIDTH, and height size, HEIGHT, in pixels
  • export to pdf
    
    $ inkscape -f FILENAME.svg -A FILENAME.pdf
    
    
    loads FILENAME.svg and exports it to FILENAME.pdf
  • export to ps
    
    $ inkscape -f FILENAME.svg -P FILENAME.ps
    
    
    loads FILENAME.svg and exports it to FILENAME.ps
  • export to eps
    
    $ inkscape -f FILENAME.svg -E FILENAME.eps
    
    
    loads FILENAME.svg and exports it to FILENAME.eps

No comments: