We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.CAD throwing exception in Docker Container for windows

I have exactly the same issue
.NET 5, 6 or 7
“Aspose.CAD” Version=“22.11.0”

running on windows fine, running on windows container breaks, WSL breaks, Linux breaks

At the end I only able to publish (Windows appServices) or running locally on Windows. nothing else works.
(converting DWG to Image)

@thiagoloureiro,
Hi. Please, attach here your DWG file, docker file, the code you use, the sequence of the steps to reproduce, so we can exactly see the issue on our side. Does the issue appear only without license? Does it appear when you export to PDF, not an image?

Hi, Issue appear with and without license, doesn’t matter.
Issue is happening when I export from DWG to Image.

here it is the github link with my code:

DWG file included on the repository.

How to run: open the API and upload the file
image.png (219.3 KB)

Running with Docker or WSL:

image.png (202.6 KB)

it breaks on Image.Load

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 = 1200;
            rasterizationOptions.PageHeight = 1200;

            // Create an instance of JpegOptions for the resultant image
            ImageOptionsBase options = new JpegOptions();

            // Set rasterization options
            options.VectorRasterizationOptions = rasterizationOptions;

            // CAD to JPG
            image.Save(outputfile, options);
        }

@thiagoloureiro,
we created CADNET-8902 to look at this issue.

Hi guys, any news?

@thiagoloureiro,
Hello, unfortunately, we need more time to investigate and solve this. The fix is planned for 23.1 release, but I can not guarantee this.

The issues you have found earlier (filed as CADNET-8902) have been fixed in this Aspose.CAD for .NET 22.12 update. This message was posted using Bugs notification tool by Oleksii.Gorokhovatskyi