Aspose.CAD.CadExceptions.ImageLoadException: Image loading failed

Would like to know your ideas on this issue I encounter. Currently using the latest version of it and attached the temporary license. Any ideas why its still causing this error? Thanks

image.png (30.1 KB)

Error in uploading and converting file
Aspose.CAD.CadExceptions.ImageLoadException: Image loading failed: Image loading failed.
—> Aspose.CAD.CadExceptions.ImageLoadException: Image loading failed.
—> System.InvalidOperationException: Cannot create graphics
at .()
at ()
at …ctor()
at …ctor()
at . ( , & )
at .( )
at …ctor( , )
at (StreamContainer , )
at .(StreamContainer , )
— End of inner exception stack trace —
at .(StreamContainer , )
at .(Stream , )
at . (StreamContainer , LoadOptions )
at Aspose.CAD.Image.LoadImage(StreamContainer streamContainer, LoadOptions loadOptions)
— End of inner exception stack trace —
at Aspose.CAD.Image.LoadImage(StreamContainer streamContainer, LoadOptions loadOptions)
at Aspose.CAD.Image.Load(String filePath)
at Decree.Stationery.Ecommerce.Infrastructure.File.Conversion.ConvertSVGToSTL.ConvertSVGtoDXF(String inputPath, String outputPath) in /app/src/Infrastructure.File.Conversion/ConvertSVGToSTL.cs:line 40
at Decree.Stationery.Ecommerce.Infrastructure.File.Conversion.ConvertSVGToSTL.Start(String inputPath, String outputPath) in /app/src/Infrastructure.File.Conversion/ConvertSVGToSTL.cs:line 35
at Decree.Stationery.Ecommerce.Infrastructure.Server.OrderTakerService.UploadStlFileToShopifyOrderAsync(ShopifyOrderDto order, Dictionary`2 requestHeaders, String requestBody) in /app/src/Infrastructure.Server/OrderTakerService.cs:lin

@kevnixs23

Please share the source file and used sample code reproducing the issue on your end so that we may try to reproduce and help you further.

I uploaded the source code for your reference

@kevnixs23

Can you please share the source files that are failing in your example.

The one I uploaded is the one is failing. The project was deployed on AWS as asp.core web api.
locallly it works but when it deployed it doesnt work.

@kevnixs23

Can you please ensure, if you have attached the file in project as I can’t find that.

sample-api.zip (1.1 MB)
Just uploaded another project. Kindly confirm if you can see this files Thanks

@kevnixs23

Can you please ensure the source CAD files are there as I can’t see them. Please simply share the CAD files that are failing to load.

Aspose.CAD.zip (7.3 MB)

Uploaded Please confirm if received

@kevnixs23

I am sorry, if I am not able to clear you before. I am requesting the source image or CAD file that is failing to get loaded. I have not found that yet in any of your sharings.
image.png (31.8 KB)

Images.zip (346.0 KB)

@kevnixs23

Thank you for sharing the file. The file that you have shared is an SVG file and Aspose.CAD for .NET/Java has got no provision to load the SVG file. Is this correct file that you have shared?

The goal of the project is to convert the SVG to STL
So the process we have in the project is to convert first the SVG to DXF using Aspose,CAD image
then convert the DXF to STL using Aspose.3D

@kevnixs23

Please check the information about input formats supported using API. The API doesn’t support loading SVG and saving as DXF. It is neither an issue in API nor a missing implementation. The API has no mandate to load SVG and save as DXF.

image.png (214.1 KB)

When I tried to convert SVG to DXF I was able to get some the conversion without any error using the Aspose.CAD

@kevnixs23

Can you please share the details in terms of SVG and DXF with us along with used code as we would like to investigate it further on our end.

Locally the conversion works fine

This is how we do the conversion
image.png (28.2 KB)

@kevnixs23

Thank you for the information. Can you please also provide following so that I can associate that with ticket.

Yes This is the details for it
image.png (20.1 KB)

@kevnixs23

Thank you for sharing the information. I have created a new ticket with ID CADNET-8226 in our issue tracking system to investigate the SVG export to DXF. We will share the feedback with you as soon as it will be addressed.

Can you please also share the SVG file that failed so that I may link that with issue.