# Reducing mesh details while exporting to vector format SVG

I am trying to export a simple cuboid into .SVG format. In the output file, the cuboid is finely meshed, which increases the file size. How to remove this detailed mesh?

 Export[FileNameJoin[{NotebookDirectory[], "trial.svg"}], Graphics3D[Cuboid[]]]


-
If you want the svg file size reduced, I found this reduces it from 48k to 15k on windows 7, using V 9.01 Export["trial.svg", Graphics3D[{FaceForm[], Cuboid[]}]] This removes all face information. –  Nasser Dec 3 '13 at 3:06
@Nasser, your answer is already good enough for me, thanks! –  saturasl Dec 3 '13 at 19:23

This mesh depends on the whole size of the Graphics3D:

Export["trial.svg", Graphics3D[Cuboid[], PlotRange -> 5, Boxed -> False],
Background -> None]


It produces 2.8 KB file (15x reduction) on Linux without the detailed mesh

For further size reduction you can use compressed SVGz format

Export["trial.svgz", ...]


It produces 666 B file. This ability seems to be undocumented.

-
Nice! I wonder why ... –  belisarius Dec 3 '13 at 15:18
@ybeltukov, Your answer shows another example of undocumented attribute... Because in the documentation of SVG format there is no information about the Background. But I understand that the bounding box can itself takes some amount of file storage, so turning it off reduce file size. Thanks! –  saturasl Dec 3 '13 at 19:39
@saturasl The Background option is hidden in Details section in the documentation of Export. See also my update about svgz format. A lot of applications can use it. It can be useful for you. –  ybeltukov Dec 3 '13 at 21:16