Free Support Forum - aspose.com

CAD file viewer in Web Browser

Hi Team,

My requirement is to view a CAD file in a native mode in web browser, actually we have a use case where we have to show the documents in Native viewer.

For Excel, we have used the Aspose.cells GridWeb and able to view the excel in Web browser even with formulae in the cells.
For Word, we have used Aspose.Words and SUNEDITOR and able to show the doc in web browser.

Now, can you please let me know is there any way to view the CAD documents in viewer like the above, if yes please provide me the sample to do the same.

GroupDocs is something different and it converts any extension to a PDF format and displays in viewer, but i need exactly what Aspose is doing in the case of Excel and Word.

Thanks in advance.

Regards,
Ashok.

@AshokKunchala

Aspose.CAD is an API that provides the programmable interface to work with CAD files. There is no front end associated with it. However, the API does provide the support for exporting to PDF or images that you may use on your end to use as display in your own created application.

Can you please share me the code samples for Aspose.CAD to convert the CAD file to Images/PDF in .net core application.

@AshokKunchala

I suggest you to please visit this documentation link for your reference.

Can you send the code samples??

@Sanjeev9910

The link that I have shared points to working examples. They are also hosted on Github too from you can download the working sample project including all examples used in online documentation.

I have referred to the URL and got the code to Convert CAD to PNG and implemented it.
I have an .DWG file which is almost 60MB and the code was unable to process it (not able to load it even after waiting for 10 mins).

So again i wrote the below logic which is for large files as mentioned in Aspose documentation

using (CadImage cadImage = (CadImage)Aspose.CAD.Image.Load(sourceFilePath))
{
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.PageWidth = 1600;
rasterizationOptions.PageHeight = 1600;
PdfOptions pdfOptions = new PdfOptions();
pdfOptions.VectorRasterizationOptions = rasterizationOptions;

            cadImage.Save(outputpath, pdfOptions);
            
        }

Even with the above code, in the first step loadng the CAD document is not completed even after 30 mins, Please let me know if i am doing wrong or can you send me a sample to load the .DWG files with 60-70MB size and convert them to Images .

Thanks!
Ashok.

@AshokKunchala

You are trying to load a pretty big DWG file on your end. The API should work with that but certainly it’s going to take lot longer to process. You can try using latest Aspose.CAD for .NET 20.8 and share the source file with us for investigation if the issue persist. You can upload file on some file server and shar the download link with us.

Hi,

I am using the Aspose.CAD .Net 20.8 version using Nuget , and i am waiting for more than 1-2 hours , still the code is running and there is no error as well.

Please find the below link for the file i am using to convert to Images.
https://spaureus-my.sharepoint.com/:u:/g/personal/kashok_aureustechsystems_com/EZy6COYDfNlKo2Ecg-PYrD0BER9y5rWEM7td-LC7-QQPgA?e=frCaB2

NOTE: Please make it private as its highly confidential.

@AshokKunchala

I have tried to export the huge DWG file to PDF on my end and its taking too much time to render. A ticket with ID CADNET-1210 has been created 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 addressed.

HI,

Is there any update on this issue ? I have already completed 15 days of my temporary license and about to purchase the product.

Need to validate all the scenarios and make this ready for production.

Thanks!
Ashok

@AshokKunchala

I regret to share that the issue has just been created in our issue tracking system and is pending in issues queue at the moment. We request for your patience and will share the good news with you as soon as the issue will be addressed.