How to remove the outer viewbox frame from dxf converted from svg?

Hello,

I am using aspose.imaging to convert svg to dxf.
Here is my current code:

using (var image = Aspose.Imaging.Image.Load(filePath))
{
	// Create an instance of DxfOptions
	var exportOptions = new Aspose.Imaging.ImageOptions.DxfOptions() { TextAsLines = true, ConvertTextBeziers = true };
	Aspose.Imaging.ImageOptions.VectorRasterizationOptions rasterizationOptions = new Aspose.Imaging.ImageOptions.SvgRasterizationOptions();
	rasterizationOptions.PageWidth = image.Width;
	rasterizationOptions.PageHeight = image.Height;
	rasterizationOptions.FullFrame = false;
	exportOptions.VectorRasterizationOptions = rasterizationOptions;

	// Save svg to dxf
	image.Save(Path.Combine(saveFolder, $"{Path.GetFileNameWithoutExtension(filePath)}_{DateTime.Now:yyyyMMddHHmmssffff}.dxf"), exportOptions);
}

Right now I have 2 problems
1、All the converted dxf will have a frame outside the graphic which svg not.
2、Some line type, eg. dashed line in svg cannot be set correctly in dxf.

You could see the svg and converted dxf in the attachments. Please help update these.
Thank you!
test.7z (11.5 KB)

@msdos41 Hello! Thank you for your interest in our product. Our team is currently investigating the issue you’ve reported. We aim to provide you with feedback as promptly as possible.

Did this get resolved? I am facing similar issue.

@msdos41
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): IMAGINGNET-7331

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

Hello, @msdos41

To export an SVG image to the DXF format without a frame, please add the following parameter to the SvgRasterizationOptions initialization:

BackgroundColor = Color.Transparent

Here’s an example of a code snippet that demonstrates this operation:

using (Image image = Image.Load(inputFilePath))
{
	var exportOptions = new DxfOptions()
	{
		TextAsLines = true,
		ConvertTextBeziers = true,
		FullFrame = true,
		VectorRasterizationOptions = new SvgRasterizationOptions()
		{
			PageWidth = (float)image.Width,
			PageHeight = (float)image.Height,
			FullFrame = true,
			Positioning = PositioningTypes.DefinedByDocument,
			CenterDrawing = true,
			BackgroundColor = Color.Transparent
		}
	};

	// Save svg to dxf
	image.Save(outputFilePath, exportOptions);
}