I can successfully use it to export a headless document as a SVG file.
However unlike other formats I cannot see a FileSvgWriteOptions class to help me set the options for export.
I’d like to be able to specify the SVG page size and scale factor being used for the export.
Is there way I can specify these options programatically using RhinoCommon? @wim I think you might have experienced this before?
We should update the SVG export for consistency on this feature, but there is already a way to write SVGs with options in RhinoCommon. See the ViewCapture.CaptureToSVG function
I tried scaling and offseting the headless document to suit the SVG export default settings but while i can get the scale roughly correct, I cannot figure out the offset its using - everything seems to get offset to the bottom right quadrant. (-12,-12)>(12,12) becomes (500,-2000)>(1700,-500). I suspect the scale factor is closers to 96dpi but the SVG file is always (0,0)>(2400,2400)
Really looking to just have control of output page size and then use Scale To Fit.
Would a peek at the export code enlighten us what settings its trying to use and why its offset?