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

Free Support Forum - aspose.com

Not converting DWG to PDF's

I've taken your example code and tried converting half a dozen .DWGs to PDFs. Not a single one came close to looking like the .DWG image. The PDF file is saved, but not at all useful.

I am doing something wrong?

string dataDir = @"C:\Sandbox\Aspose\DWGTOPDF\";
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dataDir + "9-0-0_01002R.dwg"))
{
Aspose.Imaging.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.Imaging.ImageOptions.CadRasterizationOptions();
rasterizationOptions.BackgroundColor = Aspose.Imaging.Color.White;
rasterizationOptions.ScaleMethod = Aspose.Imaging.FileFormats.Cad.ScaleType.None;

rasterizationOptions.PageWidth = 1600;
rasterizationOptions.PageHeight = 1600;


Aspose.Imaging.ImageOptions.PdfOptions PDFOptions = new Aspose.Imaging.ImageOptions.PdfOptions();
PDFOptions.PdfDocumentInfo.Title = "9-0-0_01002R";
PDFOptions.PdfDocumentInfo.Subject = "VAULT to PDF Tool";

PDFOptions.VectorRasterizationOptions = rasterizationOptions;


image.Save(dataDir + "output.pdf", PDFOptions);

Hi Joe,


Thank you for trying out Aspose.Imaging APIs.

In order to thoroughly investigate your presented scenario, we need the sample DWG files along with the resultant PDFs. It would be more appropriate if you can also share the comparison of the DWG & PDF in snapshots.