Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active September 13, 2023 08:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/1632526fda69353da42973b6a86f5b0f to your computer and use it in GitHub Desktop.
Save aspose-com-gists/1632526fda69353da42973b6a86f5b0f to your computer and use it in GitHub Desktop.
Convert DWG to SVG in C# .NET
// Load the input DWG file
Image image = Image.Load("sample.dwg");
// Initialize SvgOptions class object
ImageOptions.SvgOptions options = new ImageOptions.SvgOptions();
// Set SVG color mode
options.ColorType = SvgColorMode.Grayscale;
options.TextAsShapes = true;
// Save output SVG file
image.Save("sample.svg" , options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment