We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text Color Problem

When I convert DWG file to a pdf using Aspose.CAD.Image with different options, line colors convert fine, but the next color if very bleak. Take a look at the screen shot.test.pdf (505.0 KB).

Here is the code that I use:

string MyDir = @“C:\Temp”;
string sourceFilePath = MyDir + “test.dwg”;
string targetFilePath = MyDir + “test.pdf”;
using (Aspose.CAD.Image cadImage = Image.Load(sourceFilePath, new LoadOptions { UnloadOnDispose = true }))
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions
PageWidth = 1600,
PageHeight = 1600,
DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseObjectColor,

if (System.IO.File.Exists(targetFilePath))

cadImage.Save(targetFilePath, new PdfOptions { VectorRasterizationOptions = rasterizationOptions });


I have observed the PDF file shared by you and request you to please provide the source DWG file reproducing the issue on your end. We will be able to investigate the issue further on our end on provision of requested information. I also suggest you to please try using latest Aspose.CAD for .NET 19.9 on your end before sharing the information with us. I also request you to please share the desired output PDF as well with us.

I tried 19.9 with the same result
I’ve attached a zip file with the original dwg.test.zip (40.6 KB)

Another question, what .net version are your library compatible with?
Our app is currently using 4.6 and we are planning eventually to upgrade it to higher versions. The library that I got (aspose.CAD 19.9) seems to use .net 4.0
Thank you


Thank you for sharing the DWG file and an issue with ID CADNET-971 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

For your second question concerning to .NET assembly to use, you need to use .NET 4.0 assembly for .NET Framework 4 and above.

The issues you have found earlier (filed as CADNET-971) have been fixed in this update.