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