CAD file will be converted to the image format, and found that some of the documents will be converted into a blank picture, there are some direct conversion process failure, what is the reason, thank you
Here’s my code:
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(filePath))
{
Aspose.CAD.ImageOptions.CadRasterizationOptions
rasterOpts = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
var scaleType = Aspose.CAD.FileFormats.Cad.ScaleType.None;
var PageWidth = (float)image.Width;
var PageHeight = (float)image.Height;
if (image.Width > 50000 || image.Height > 50000)
{
if (image.Width > image.Height)
{
PageWidth = 50000;
PageHeight = (float)image.Height / (float)image.Width * 50000;
}
else
{
PageHeight = 50000;
PageWidth = (float)image.Width / (float)image.Height * 50000;
}
scaleType = Aspose.CAD.FileFormats.Cad.ScaleType.ShrinkToFit;
}
rasterOpts.PageHeight = PageHeight;
rasterOpts.PageWidth = PageWidth;
rasterOpts.ScaleMethod = scaleType;
rasterOpts.BackgroundColor = Aspose.CAD.Color.White;
rasterOpts.AutomaticLayoutsScaling = true;
rasterOpts.CenterDrawing = true;
rasterOpts.DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseObjectColor;
rasterOpts.TypeOfEntities = Aspose.CAD.ImageOptions.TypeOfEntities.Entities2D;
Aspose.CAD.ImageOptionsBase opts = new Aspose.CAD.ImageOptions.BmpOptions();
opts.VectorRasterizationOptions = rasterOpts;
image.Save(outputPath, opts);
}
Hi,
Thank you for your inquiry and sharing sample code.
This is to update you that we need sample input file to reproduce the issue at our end. Please forward us the problematic input file. We will investigate the issue and will update you with our findings in this thread.
I uploaded 3 files, including demo.dwg files converted to blank images, the other two failed in the conversion process, please help to deal with, thank you.
Hi,
Thank you for sharing samples with us.
This is to update you that we have investigated the issue. Initial investigation shows that the issue persists. The issue has been logged into our system with ID CADNET-263. Our product team will further look into it and provide feedback. We will update you with the feedback once available in this thread.
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.