Failed to convert to pdf from dwf file with Aspose CAD 19.5


#1

Hi,

I’m trying to do convert with Aspose CAD, but have a problem with a dwf file.

My samples code:

string outputFile = “output.pdf”;
string inputFile = “ABC1-A5-SecAA.dwf”;
try
{
Aspose.CAD.Image image= (DwfImage)Aspose.CAD.Image.Load(inputFile );
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
rasterizationOptions.BackgroundColor = Aspose.CAD.Color.White;
rasterizationOptions.PageWidth = image.Width;
rasterizationOptions.PageHeight = image.Height;

Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
pdfOptions.VectorRasterizationOptions = rasterizationOptions;
image.Save(outFile, pdfOptions);
}
catch(Exception e)
{
string errorMsg = e.Message;
}

When trying to save the image (Image.Save()), I got an exception: “Image saving failed.”

I’m using Aspose Cells NET 19.5 and here is my samle: ABC1-A5-SecAA.zip (58.3 KB)

Please check and give me feedback about this problem.

Thank you


#2

@dunghnguyen,

I have worked with the file shared by you and have been able to observe the issue specified. An issue with ID CADNET-826 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 fixed.