Render Image with Rotating Pdf (Asp.net Mvc)

1

I have an Action responsible for generating the PDF using Rotating ... The action code is as follows:

public ActionResult PDFPadrao()
    {
        string header = Server.MapPath("~/Views/Relatorio/Header.html");
        string customSwitches = string.Format("--header-html \"{0}\" " , header);

        var pdf = new ViewAsPdf()
        {
            ViewName = "Modelo",
            CustomSwitches = customSwitches

        };

        return pdf;
    }

The contents of the Header.html file are as follows:

<!DOCTYPE html>
 <html>
  <head>
    <title></title>
  </head>
<body>
  <div>
     <img src="@Server.MapPath('~/Images/337946.png')"/>
  </div>
</body>
</html>

I want to render this image in pdf, however it is not being rendered, it just looks like this:

How can I resolve?

    
asked by anonymous 20.08.2018 / 14:03

0 answers