Distorted Images in aspose version 21.3.0

Hello, I was working with ASPOSE CAD version Image generation in ASPOSE 21.2.0 and the images that I was generating from a DXF hiding a layer was as follows:
capture1.PNG (37.6 KB)
capture2.PNG (25.5 KB)

But I updated to the latest version 21.3.0 and it generates distorted images.
capture3.PNG (25.1 KB)
capture4.PNG (20.9 KB)

The dxf file is: plan.zip (1.6 MB)

My code is:
using (var cadImage = (CadImage) Aspose.CAD.Image.Load(customPlanStream))
var rasterOptions = new CadRasterizationOptions
PageWidth = 2600F * 3, //cadImage.Width
PageHeight = 2100F * 3, //cadImage.Height
AutomaticLayoutsScaling = true,
ExportAllLayoutContent = true,
DrawType = CadDrawTypeMode.UseObjectColor,
Margins = new Margins() { Top = 0, Bottom = 0 },
Quality = new RasterizationQuality
Arc = RasterizationQualityValue.High,
Hatch = RasterizationQualityValue.High,
Text = RasterizationQualityValue.High,
TextThicknessNormalization = true
Layouts = new string[] { layout },
Layers = cadImage.Layers.GetLayersNames().Where(l => !l.Equals(“PROSPEKT-EINFÄRBUNG”)).ToArray()
var imageOptions = new JpegOptions
VectorRasterizationOptions = rasterOptions,
ColorType = JpegCompressionColorMode.Grayscale,
var output = new MemoryStream();
cadImage.Save(output, imageOptions);
output.Position = 0;
return output;

Thanks for your help!


I have created a ticket with ID CADNET-8055 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.


Can you please provide the Sample Visual Studio project as our team would like to analyze it more deeply. Please share the complete project with us.

1 Like

Hi @mudassir.fayyaz,
Sure, the process is the following:

  • Read a DXF file (The path is displayed in the console)
  • Extract Layouts.
  • Extract the dimensions in the plan.
  • Set dimension values for generate a custom plan with custom dimensions.
  • Generate images from the custom dxf by layouts
  • Export a PDF with the images (The path is displayed in the console).

The file weighs 10MB aprox. so the page recommends use an external link:
Enter and click in download.

Result: plan.pdf (2.2 MB)

As a reminder, the successful result is in the screenshots attached in the main question.


Thank you for sharing the details with us. We will share the good news with you as soon as the issue will be fixed.

Do you have news?


I regret to share that at present there are no updates for the status of the issue. We will share the feedback with you as soon as it will be fixed.


Thank you very much for your anwser.
I need to know what the problem is before buying the Aspose.CAD for NET.



The issue has been marked as resolved in upcoming Aspose.CAD for .NET 21.5. We request for your patience till the time the product will be released.