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

Free Support Forum - aspose.com

Exception "Image Saving Failed" on converting DXF file to PDF(C# .NET)

Using your sample code I was trying to convert the CAD file to PDF, it throws me error message “Image Saving Failed”.(error1) and version issue (Error 2).

Error 1 : used pdfFjkOBS.dxf for that it thrown image saving failed
Error 2 : used WineBottle_Die.dxf for that it thrown me version issue.

File_Attached_with_Error.zip (265.7 KB)

We though of buying license for ASPOSE CAD to PDF conversion, before that I was working around with the sample file, but it given me few errors in conversion. Please help me out to solve the above issues.


I have worked with the DXF files shared by you and have been able to observe the issues. An ticket with ID CADNET-792 for image saving failed issue and ticket with ID CADNET-793 has been created for version issue in our issue tracking system to further investigate and resolve the issues. This thread has been linked with the issues so that you may be automatically notified once the issues will be fixed.

Hi Ahmad,
Could I know the status of the issue which I have reported for the DXF to PDF conversion issue. The issue id CADNET-792,CADNET-793. Please suggest us the output, so that we can proceed further for the licensing.

Dharmesh CB


I have verified from our issue tracking system and like to inform that these issues have been added recently in our issue tracking system and are pending for investigation in issues queue. We request for your patience till the time the issues get scheduled and resolved on their due turn.

The issues you have found earlier (filed as CADNET-792) have been fixed in this update.

Hi ,
Thanks for the update and I took the latest code and now I didn’t get the error for this ticket fix CADNET-792

But when I open the (pdfFjkOBS.dxf)pdf it is not opening and it throws error message like “Error occurred on the page”. I have attached the latest code what I have used and error screen shot for not opening the PDF. Kindly do the needful.

Thanks & Regards,
Dharmesh CBCode_Error2.JPG (33.4 KB)
Code_Error1.JPG (43.9 KB)


I have worked with source file and sample code using Aspose.CAD 19.7 and unable to observe any error. Can you please try to use latest version on your end and share feedback with us. I have also shared my generated result with you.pdfFFF.pdf (37.9 KB)

Hi Ahmad,

Yes, now I can able to generate the PDF and able to open the PDF. Thanks for the support.


It’s good to know things are fine on your end.

Good day. I have a query like when will be this ticket(CADNET-793) will get resolved. so that it will be very useful for us. Thanks in advance.


I like to inform that we are working on this and will share feedback with you soon.


I am facing error while converting .DXF files to .PDF.

I am using below ASP DXF to PDF conversion code:
string myDir = ConfigurationManager.AppSettings[“Path”];
string sourceFilePath = myDir + itemId + “.dxf”;
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath))
// Create an instance of CadRasterizationOptions and set its various properties
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
rasterizationOptions.PageWidth = 1600;
rasterizationOptions.PageHeight = 1600;
rasterizationOptions.BackgroundColor = Aspose.CAD.Color.Beige;
rasterizationOptions.DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseDrawColor;
rasterizationOptions.DrawColor = Aspose.CAD.Color.Blue;

                    // Create an instance of PdfOptions
                    Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
                    // Set the VectorRasterizationOptions property
                    pdfOptions.VectorRasterizationOptions = rasterizationOptions;

                    //Export CAD to PDF
                        image.Save(ConfigurationManager.AppSettings["Path_PDF"] + itemId + ".pdf", pdfOptions);
              }<a class="attachment" href="/uploads/discourse_instance3/31050">DXF-TO PDF_Conversion.zip</a> (48.4 KB)

Error message: Key is not available


I have observe the issue shared by you and request you to please first try using latest Aspose.CAD for .NET 19.9 on your end. In case there is still an issue then please share the source file reproducing the issue on your end.

Hi @mudassir.fayyaz, Thanks for reply.

I have already tried with latest Aspose version i.e. but still facing the issue.

I have attached some sample .DXF file in below link:




I have worked with the DXF files shared by you and have been able to observe the issue. An ticket with ID CADNET-966 has been created in our issue tracking system to further investigate and resolve the issues. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

I have query like when I convert the DXF file to PDF, I should retain the DIELINE layer. Is it possible to set the DIELINE information to the PDF.


I like to inform that it is possible using rasterization options via Layer property.

Do you have any samples to get the DIELINE information using rasterization and convert PDF


I like to share that the issue has just recently been added in our issue tracking system. We request for your patience till the time issue gets resolved. We will share the notification with you once it will be fixed.

Thanks for your reply. if you provide us that solution it will be very useful. Also once you gives DIELINE solution, will work around with that and will go for licensing. What is procedure to get licensing?