Created
October 2, 2025 21:07
-
-
Save aspose-com-gists/fb177f0712d136eccff213373c9615fc to your computer and use it in GitHub Desktop.
Develop a DXF to SVG Converter in C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define the path for the working directory. | |
string MyDir = "files"; | |
string sourceFilePath = MyDir + "conic_pyramid.dxf"; | |
// Load the source DXF file by calling the load method. | |
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath)) | |
{ | |
// Create an object of CadRasterizationOptions | |
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions(); | |
// Define page width & height. | |
rasterizationOptions.PageWidth = 1200; | |
rasterizationOptions.PageHeight = 1200; | |
// Instantiate an instance of the SvgOptions for the resultant SVG image. | |
var options = new Aspose.CAD.ImageOptions.SvgOptions(); | |
// Set rasterization options. | |
options.VectorRasterizationOptions = rasterizationOptions; | |
MyDir = MyDir + "conic_pyramid_raster_image_out.svg"; | |
// Save resultant image by calling the Save method. | |
image.Save(MyDir, options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment