On Mon, 2007-01-22 at 23:05 -0400, bulia byak wrote:
On 1/22/07, ryan lerch <ryanlerch@...400...> wrote:
i am wondering if there is a command for the inkscape command line that allows an svg's document boundry to be reduced to fit tight around all the elements.
What do you need it for? If for bitmap export, then you already have this option, --export-area-drawing. So while you can't do this as an svg-to-svg conversion, you can crop it when you export the bitmap through Inkscape, which may be sufficient for your case.
Open Clip Art Library needs to be able to modify an SVG so that the canvas size/viewport is the same as the largest width and height of any object in a file.
Hence, why I want to just add the commandline option to do this in-place like vacuum. It will save massive time and would be useful for others needing and using inkscape to generate galleries, etc...otherwise, there is massive whitespace in files, depending upon how an author saves their svg and submits it to SVG...
Yes, if you can think of another way of doing this easily and from the commandline, please let me know...otherwise, I tested what you recommended and it does not give the results sought.
In the code, this flag only allows for exporting of PNG:
if (sp_export_png || sp_export_id || sp_export_area_drawing) { sp_do_export_png(doc); }
Thus, there are two ways to move ahead to attain this functionality, make sp_export_area_drawing option export more than just png amd allow generic Inkscape SVG and just plain-svg options from the commandline so that export also can export SVG. Or, the approach I outlined previously...either is fine with me...thoughts?
Jon