follyroof
follyroof

Reputation: 3540

Cropping SVG to Remove Surrounding Whitespace

I've got a collection of SVG's that were generated by taking a corresponding collection of PNG's, live-tracing them all in Adobe Bridge, saving them as AI, and converting those AI files to SVG's using Adobe's builtin scripts.

The shapes in the SVG's turned out fine -- however, somewhere in the process a bunch of extra padding was added to the sides of the images. To be more precise, the height and width properties of the itself as well as the dimensions of the viewBox are much larger than the shapes they contain.

Are there any solutions (ranging from string substitution in the .svg's to fancy Adobe scripts) to automatically set the dimensions of the viewBox fit only the shapes, or otherwise crop the SVG to achieve the same effect?

I'm new to SVG, so let me know if there's additional information that could be helpful.

Thanks

Upvotes: 3

Views: 1905

Answers (0)

Related Questions