I would like to trim whitespace from an SVG from the terminal (i.e. so I can script the operation).
So far, I have tried to use Imagemagick, but the result is not satisfactory. For example, trimming the following image using the following command:
convert -trim output-page001.svg output-page001-trim.svg
but the results are unsatisfactory - blocky and ugly.
Does anyone know know of a good way to do it?
Some context:
- I'm not tied to the SVG format; I can convert as required
- I originally asked this at the ubuntu forums without success :(
- The driver of this question was about extracting equations from a LaTeX document. Unfortunately, it has way too much whitespace around the image.