I'm a newbie to PDFSharp and C#- so far I think it's working very well and quite easy to use.
I'm using PDFSharp in conjunction with Silverlight 4 and ArcGIS Server to create PDF map output. That works fine. I've also had the need to add some graphic elements (rectangles and text). That works fine too- so far I have a clean PDF that looks exactly how I want. But I'm having trouble adding an image to this layout. From the examples it seems that all I should need to do is add two lines of code as follows:
Code:
XImage imgLegend = XImage.FromFile("Graphics/Legend.png");
gfx.DrawImage(imgLegend, 500, 500);
The problem here is that VS is throwing the error:
'PdfSharp.Drawing.XImage.FromFile(string)' is obsolete: "'Can't use this in Silverlight!'"
Is the FromFile method really obsolete? Any suggestions for a workaround?
Thanks,
Dave