Friday, March 17, 2017

Converting SVG to PDF on Linux Command Line

A number of tools available for converting a SVG to a PDF file on Linux command line, for instances,
  • rsvg-convert
    
           $ sudo apt-get install librsvg2-bin
           $ rsvg-convert -f pdf -o mygraph.pdf mygraph.svg
        
  • ImageMagick
    
           $ sudo apt-get install imagemagick
           $ convert mygraph.svg mygraph.pdf
        
  • Inkscape
    
           $ sudo apt-get install inkscape
           $ inkscape mygraph.svg --export-pdf=mygraph.pdf
        

A few others include GhostPDL and CairoSVG. Each of these tools has its own limitations, particularly, supported SVG features. My limited use points to that Inkspace appears to have the most supported features.

1 comment: