PDF Preview
Per vedere un pdf in pagina mi basta mettere un Iframe e
salvare i byte del documento su filesystem dopodichè cambio il source
dell'Iframe.
<iframe runat="server" id="frameDisplayDocId" width="500px" height="800px"></iframe>
protected
void Page_Load(object
sender, EventArgs e)
{
string
docName = Request.QueryString["docName"];
string
docId = Request.QueryString["docId"];
string
docExtension = Request.QueryString["docExtension"];
byte[]
document = GetDocumentByte();
if (document != null)
{
string SaveLocation = string.Format(@"{0}\SuitesUploadFolder\{1}\");
System.IO.File.WriteAllBytes(SaveLocation
+ docId + "." + docExtension, document);
string fileFullPath = "../../../SuitesUploadFolder/+ docId + "."
+ docExtension;
frameDisplayDocId.Attributes.Add("src",
fileFullPath);
}
}