I try to convert dwg to svg then some point is not same source file
image.jpg (235.1 KB)
my code is: (.net core 3.1, Aspose.CAD 21.10.0.0)
using (var stream = file.InputStream)
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(stream))
{
// Create an instance of CadRasterizationOptions
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
// Set page width & height
rasterizationOptions.PageWidth = size;
rasterizationOptions.PageHeight = size;
rasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor;
// Set Graphic Options
rasterizationOptions.GraphicsOptions.SmoothingMode = SmoothingMode.HighQuality;
rasterizationOptions.GraphicsOptions.TextRenderingHint = Aspose.CAD.TextRenderingHint.ClearTypeGridFit;
rasterizationOptions.GraphicsOptions.InterpolationMode = InterpolationMode.High;
// Create an instance of JpegOptions for the resultant image
var optionJpg = new JpegOptions();
var optionSvg = new SvgOptions();
// Set rasterization options
optionJpg.VectorRasterizationOptions = rasterizationOptions;
optionSvg.VectorRasterizationOptions = rasterizationOptions;
optionSvg.MinimumLinewidth = 0;
// CAD to JPG
//image.Save(jpgFileNameWithFullPath, optionJpg);
image.Save(jpgFileNameWithFullPath, optionSvg);
}
return new ContentResult
{
Content = $@"\Content\cf-images\{jpgFileName}"
};
image.jpg (235 KB)