Hi,
In my code I'm opening a document DWG and I'm inserting an image, this is done correctly. The image is showing in the DfxModel viewer quite well.
The problem is that when I export the DxfModel to PDF or DXF the image I inserted does not appear into the PDF or DXF.
Is there a way to insert the image into an DxfModel and to be part of the PDF or DXF file? am I doing something wrong or there is a bug?
I use your example from: http://www.woutware.com/forum/index.php?topic=87.0, to insert an image.
and I export to PDF like in the help file :
      GraphicsConfig graphicsConfig = (GraphicsConfig)GraphicsConfig.WhiteBackgroundCorrectForBackColor.Clone();
      graphicsConfig.DisplayLineWeight = false;
      graphicsConfig.DrawImages = true;
      GDIGraphics3D cadGraphics = new GDIGraphics3D(graphicsConfig);
      cadGraphics.CreateDrawables(_model);
      Bounds3D bounds = new Bounds3D();
      cadGraphics.BoundingBox(bounds, Matrix4D.Identity);
      PaperSize paperSize = PaperSizes.GetPaperSize(PaperKind.Letter);
      float pageWidth = paperSize.Width / 100f;
      float pageHeight = paperSize.Height / 100f;
      float margin = 0.5f;
      Matrix4D to2DTransform = DxfUtil.GetScaleTransform(
         bounds.Corner1,
         bounds.Corner2,
         new Point3D(bounds.Center.X, bounds.Corner2.Y, 0d),
         new Point3D(new Vector3D(margin, margin, 0d) * PdfExporter.InchToPixel),
         new Point3D(new Vector3D(pageWidth - margin, pageHeight - margin, 0d) * PdfExporter.InchToPixel),
         new Point3D(new Vector3D(pageWidth / 2d, pageHeight - margin, 0d) * PdfExporter.InchToPixel)
      );
      using (Stream ms = File.Create(filename))
      {
        PdfExporter pdf = new PdfExporter(ms);
        pdf.DrawPage(_model, graphicsConfig, to2DTransform, paperSize);
        pdf.EndDocument();
      }
Thanks for yor help