Maximize productivity with
30% off* for a limited time
using BOOSTDEV30.
Includes 3- and 5-packs.
*Some exclusions may apply.New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.
public object Load(Dictionary<string, string> jsonResult)
{
PdfViewerHelper helper = new PdfViewerHelper();
//load the multiple document from client side
if (jsonResult.ContainsKey("newFileName"))
{
var name = jsonResult["newFileName"];
var pdfName = name.ToString();
string path = HttpContext.Current.Server.MapPath("~/content/images/FileExplorer/" + pdfName);
helper.Load(path);
}
else
{
if (jsonResult.ContainsKey("isInitialLoading"))
{
if (jsonResult.ContainsKey("file"))
{
string path = HttpContext.Current.Server.MapPath("~/" + jsonResult["file"].ToString().Substring(jsonResult["file"].ToString().IndexOf("/") + 1));
helper.Load(path);
}
else
{
string path = HttpContext.Current.Server.MapPath("~/content/images/FileExplorer/pdf/HTTP Succinctly.pdf");
helper.Load(path);
}
}
}
string output = JsonConvert.SerializeObject(helper.ProcessPdf(jsonResult));
return output;
}
|