title: How can I add stream (file less) image in PDF using MigraDoc?
body: <p>When I use the following code, it shows no image in PDF.<br>
  Here is my code</p>
  
  <pre><code>    private static void RenderHtmlToImage(string html, Paragraph paragraph, int pageCnt)
      {
          System.Drawing.Image image = HtmlRender.RenderToImageGdiPlus(html);
          //var tempImagefile = tempImagePath + "\\tempImage_" + pageCnt + ".png";
          //image.Save(tempImagefile, ImageFormat.Png);
          //paragraph.AddImage(tempImagefile);
  
          byte[] imageArray = imageToByteArray(image);
          string imageFilename = "base64:" + Convert.ToBase64String(imageArray);
          paragraph.AddImage(imageFilename);
      }
  
      public static byte[] imageToByteArray(System.Drawing.Image imageIn)
      {
          MemoryStream ms = new MemoryStream();
          imageIn.Save(ms, ImageFormat.Png);
          return ms.ToArray();
      }
  </code></pre>
  
  <p>It works perfectly fine when I save the image in the local folder.<br>
  I have followed this link as well <a href="http://www.pdfsharp.net/wiki/MigraDoc_FilelessImages.ashx" rel="nofollow noreferrer">http://www.pdfsharp.net/wiki/MigraDoc_FilelessImages.ashx</a> but it doesn't work for me.</p>