Hi, I'm trying to show a pdf file in a new tab, Can you help me? I can download but not top open in new tab.
I have the file in Stream or Byte[] array
I'm using MVC and entity framework
public ActionResult ShowPDFLabel()
{
System.IO.Stream file = //get file
Response.ContentType = "Application/pdf";
return File(file, "application/pdf", "somefile.pdf");
}
<a class="btn btn-sm btn-info" href="Entry/ShowPDFLabel" target="_blank" ><i class="fa fa-barcode"></i> @Resources.Print @Resources.Labels</a>