PDFsharp & MigraDoc Foundation

System.Drawing.Graphics and XGraphics
Page 1 of 1

Author:  ccm [ Mon Dec 11, 2006 10:39 am ]
Post subject:  System.Drawing.Graphics and XGraphics

I am using Dundas Chart to draw some charts and would like to put these on a PDF. However I cannot find a way to copy a System.Drawing.Graphics to an XGraphics. PdfSharp also does not appear to support System.Drawing.Imaging.Metafile so I cannot draw on this and then draw that on the XGraphics. The only way I have got this working is by using a bitmap which really isn't very useful.

Author:  Stefan Lange [ Mon Dec 11, 2006 8:43 pm ]
Post subject: 

There is no simple solution for your problem. I know Dundas Chart and a combination of Dundas Chart and PDFsharp would be really a powerful and successful product! But the only way to do that is to integrate PDFsharp into the source of the chart library using XGraphics as their drawing context and that is a job only Dundas Software can do.

The conversion of Windows Metafiles into PDF is theoretically possible but in detail very difficult and a lot of hard work. Some libraries (like PDF4NET from O2 Solutions) have such functionality, but when I tried it (about a year ago) the results looked pretty only for very simple metafiles.

So with PDFsharp using bitmaps is the only way currently possible.

Stefan Lange

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group