Bad convertion of DWG files


#1

While using the function below with standard rasterization options, the results for the attached dwg (an example, not the only one it occurs) the result come out very different from the expected (also attached):

try
{
	FileInfo fileInfo = new FileInfo(pVaultFileInfo.FSPath);
	License license = new License();
	license.SetLicense(LicStream);
	using (Image image = Image.Load(pVaultFileInfo.FSPath))
	{
		var rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions()
		{
			PageSize = image.Size,
			BackgroundColor = Color.White
		};

		try
		{
			image.Save(
			Path.Combine(pdfsDir, pVaultFileInfo.FileName + ".pdf"),
			new Aspose.CAD.ImageOptions.PdfOptions()
			{
				VectorRasterizationOptions = rasterizationOptions
			});
		}
		catch (Exception e)
		{
			LicStream.Close();

			Console.WriteLine("Exception: " + e.ToString());

			if (TrueviewWorkaround(pVaultFileInfo))
				return true;

			return false;
		}
		finally
		{
			LicStream.Close();
		}
	}
}
catch (ImageLoadException e)
{
	LicStream.Close();

	this.AppendLog(pdfsDir, logFileName, e.ToString(), true);

	if (TrueviewWorkaround(pVaultFileInfo))
		return true;

	return false;
}
catch (Exception e)
{
	LicStream.Close();

	Console.WriteLine("Exception: " + e.ToString());
	this.AppendLog(pdfsDir, logFileName, e.ToString(), true);

	return false;
}

problematic files.zip (764.1 KB)

I am using Aspose.CAD for .NET v. 19.7.0


#2

@ralemos,

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