That was the latest version of Aspose.CAD:
CODE:
using (DwfImage cadImage = (Aspose.CAD.FileFormats.Dwf.DwfImage)Image.Load(cadFile))
{
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions
{
PageWidth = isA3 ? 420 : 297,
PageHeight = isA3 ? 297 : 210,
UnitType = UnitType.Millimeter,
AutomaticLayoutsScaling = false,
Zoom = 0.9F
};
PdfOptions pdfOptions = new PdfOptions
{
VectorRasterizationOptions = rasterizationOptions
};
cadImage.Save(pdfFile, pdfOptions);
}
STACK TRACE:
Error Message: Arithmetic operation resulted in an overflow.
Error Source: Aspose.CAD
Error HResult: -2146233066
Machine Name: TRUSSCORPWKS53
Employee: Rob Parmenter
Frame 1 - Error Line: 28, 28
Frame 1 - Error Method: Void ConvertDwfToPdf(System.String, System.String, Boolean)
Stack Trace: Aspose.CAD
Image loading failed: Arithmetic operation resulted in an overflow.
at Aspose.CAD.Image.LoadImage(StreamContainer streamContainer, LoadOptions loadOptions)
at Aspose.CAD.Image.Load(String filePath)
at TrussCorp.Web.CadFileFunctions.ConvertDwfToPdf(String cadFile, String pdfFile, Boolean isA3) in C:\Users\robparmenter\repos\TrussCorp.Web\CadFileFunctions.cs:line 28
Aspose.CAD
Arithmetic operation resulted in an overflow.
at . (Int32 , Int32 )
at Aspose.CAD.FileFormats.Dwf.Whip.Objects.Drawable.DwfWhipPointSet.Materialize16Bit( parser)
at Aspose.CAD.FileFormats.Dwf.Whip.Objects.Drawable.DwfWhipPolymarker.Materialize( operationCode, parser)
at . ()
at . ()
at . ()
at .LoadDrawableResources(List`1 )
at Aspose.CAD.FileFormats.Dwf.DwfImage.CreateInnerImage()
at Aspose.CAD.FileFormats.Dwf.DwfImage…ctor( dwfPackageManager)
at . (Stream , LoadOptions )
at . (StreamContainer , LoadOptions )
at Aspose.CAD.Image.LoadImage(StreamContainer streamContainer, LoadOptions loadOptions)