The short version of the story: I tried to use CairoSVG to convert SVG files to smaller PDF files than I was getting from Illustrator. It was a pain to install. After installing, the files were smaller in bytes, but they were also smaller on my screen. Fixing the as-viewed size caused other things to go wrong. I gave up and am still looking for SVG to PDF conversion software that doesn't require a GUI and actually works.
An unsuccessful attempt to use CairoSVG to generate small vector-graphics PDF files
ImageMagick's "convert" tool can, well, convert between image formats (including SVG, PNG, and PDF), and scale, rotate, resize, etc while doing so.
I'm not on a Mac at the moment to check, but I'm also pretty sure that installation should be straightforward if you use Homebrew or MacPorts.
+Sariel Har-Peled if you want to see how well ipe's conversion works, you could just use the SVG that I used as the figure in my LJ post. Is it possible to do an ipe conversion from the command line or do you need to fire up the GUI?
I did try converting an SVG image to PDF before leaving the above comment, and the results looked good enough to me. I realize that it still will not be good enough for your uses.
https://nonzen.in/files/grid-onion.pdf
https://nonzen.in/files/grid-onion.ps
I'm not sure why it chose the black background.
Just to compare, Inkscape produced this:
https://nonzen.in/files/grid-onion-inkscape.pdf
https://nonzen.in/files/grid-onion-inkscape.ps
But Inkscape obviously has a GUI, so it is obviously disqualified...
# inkscape -C -z /tmp/grid-onion.svg -A /tmp/grid-onion.pdf
# gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=/tmp/grid-onion2.pdf /tmp/grid-onion.pdf
# ls -ltr /tmp/grid-onion*
9688 Feb 17 07:18 /tmp/grid-onion.svg
38037 Feb 17 07:55 /tmp/grid-onion.pdf
4994 Feb 17 07:55 /tmp/grid-onion2.pdf
5k don't seem that bad, IMHO.
Under linux. Size is 5K which is smaller than the svg file.
rsvg-convert -f pdf grid-onion.svg > x.pdf