Free Support Forum - aspose.com

Aspose.CAD ,net

03D01SA0303.zip (1.6 MB)

    static void Main(string[] args)
    {
        string MyDir = @"D:\03D01SA0303.pdf";
        string sourceFilePath = @"D:\03D01SA0303.dwg";
        using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath))
        {
            // Create an instance of CadRasterizationOptions and set its various properties
            Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
            rasterizationOptions.BackgroundColor = Aspose.CAD.Color.White;
            rasterizationOptions.PageWidth = 1600;
            rasterizationOptions.PageHeight = 1600;

            // Create an instance of PdfOptions
            Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
            // Set the VectorRasterizationOptions property
            pdfOptions.VectorRasterizationOptions = rasterizationOptions;


            // Export the DWG to PDF
            image.Save(MyDir, pdfOptions);
        }
    }

dwg转pdf,为什么转出来pdf无内容?

@jiao,

我已经观察到共享的问题,并请您先尝试将Aspose.CAD用于.NET 19.9。 如果问题仍然存在,请提供生成的PDF以供参考。

image.png (4.8 KB)
0字节,打不开

@jiao,

我已经使用Aspose.CAD处理了您共享的源文件和示例代码,但无法观察到该问题。您能否分享指向该问题的屏幕截图