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

Free Support Forum - aspose.com

OLE Pic Object missing when i convert dwg ModelSpace to pdf

when i convert dwg ModelSpace (contain one OLE Pic) to PDF,the OLE Pic is Missing ,anyone one knows how to solve this ?Best regards

Development environment:
C#.NET
Aspose.Cad version 22.10

Main Code:

   private void button2_Click(object sender, EventArgs e)
    {
        //弹窗选择pdf保存位置
        SaveFileDialog sfd = new SaveFileDialog();
        sfd.Filter = "pdfFile|*.pdf";
        
        if (sfd.ShowDialog()==DialogResult.OK)
        {
            string dwgPath = textBox1.Text;
            string cadPath = sfd.FileName;
            Aspose.CAD.LoadOptions opt = new Aspose.CAD.LoadOptions();
            
            Aspose.CAD.Image cadImage1 = Aspose.CAD.Image.Load(dwgPath,opt);

            PdfOptions pdfOptions = new PdfOptions();
            CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
            pdfOptions.VectorRasterizationOptions = rasterizationOptions;
            rasterizationOptions.PageHeight = 1200;
            rasterizationOptions.PageWidth = 1600;
            rasterizationOptions.ScaleMethod = ScaleType.ShrinkToFit;
            rasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor;
            rasterizationOptions.Layouts = new string[] { "Model" };

            cadImage1.Save(cadPath, pdfOptions);
            MessageBox.Show("Done","info",MessageBoxButtons.OK,MessageBoxIcon.Information);
        }
    }

err1.png (179.9 KB)
testDwg.zip (208.4 KB)

@dacefly09,
Hi. There are some difficulties for the support of OLE, but I hope some our last improvements will make this file possible to render correctly with the upcoming 22.11 release. I also created CADNET-8891 in our logging system to track this issue.

The issues you have found earlier (filed as CADNET-8891) have been fixed in this Aspose.CAD for .NET 23.1 update. This message was posted using Bugs notification tool by Oleksii.Gorokhovatskyi