Free Support Forum - aspose.com

Bad convertion of DWG files

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

@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.

Any updates on this? I already tested with version 19.9 and the issue still occurs…

@ralemos,

I have verified the issue status from our issue tracking system and like to share that the issue is still unresolved. We request for your patience till the time the issue gets resolved. We will share notification with you as soon as the issue will be fixed.