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)