Can anyone please tell me how could I stream a pdf to a new tab browser? I just have the pdf stream on memory and when I click over the link I want to show the PDF in a new tab or window browser. How can I accomplish this? Thanks in advance!
I have this link:
<a id="hrefPdf" runat="server" href="#" target="_blank">
<asp:Literal ID="PdfName" runat="server"></asp:Literal>
</a>
In the code above I have this on the onload
event:
Stream pdf= getPdf
if (pdf != null)
{
SetLinkPDF(pdf);
}
private void SetLinkPDF(IFile pdf)
{
hrefPdf.href = "MyPDF to the Browser"
PdfName.Text = pdf.PdfName;
}
Someway I have to process the stream pdf (IFile contains Name, Stream, Metadata, etc of the PDF)
What can I do to process this and when I click show the stream at a new browser?