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