ImageSource imageSource =
new
ImageSource(
new
MemoryStream(
this
.ConvertWmfImageToPng(stream)));
document.Pages.AddPage().Content.AddImage(imageSource);
...
private
byte
[] ConvertWmfImageToPng(Stream wmfImageStream)
{
byte
[] pngBytes;
using
(MemoryStream pngImageStream =
new
MemoryStream())
{
System.Drawing.Image imageDrawing = System.Drawing.Image.FromStream(wmfImageStream);
imageDrawing.Save(pngImageStream, System.Drawing.Imaging.ImageFormat.Png);
pngBytes = pngImageStream.ToArray();
}
return
pngBytes;
}