Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143727 | Apr 2,2019 09:56 PM UTC | Apr 4,2019 05:24 AM UTC | ASP.NET MVC - EJ 2 | 3 |
![]() |
Tags: PDF Viewer |
public object Load(Dictionary<string, string> jsonResult)
{
PdfViewerHelper helper = new PdfViewerHelper();
//load the multiple document from client side
if (jsonResult.ContainsKey("newFileName"))
{
PdfViewerHelper.CachePath = HttpContext.Current.Server.MapPath("~/Data");//Store the cache data in the data folder of the sample.
var name = jsonResult["newFileName"];
var pdfName = name.ToString();
helper.Load(HttpContext.Current.Server.MapPath("~/Data/" + pdfName));
}
else
{
if (jsonResult.ContainsKey("isInitialLoading"))
{
PdfViewerHelper.CachePath = HttpContext.Current.Server.MapPath("~/Data");");//store the cache data in the data folder.
helper.Load((HttpContext.Current.Server.MapPath("~/Data/HTTP Succinctly.pdf")));
}
}
string output = JsonConvert.SerializeObject(helper.ProcessPdf(jsonResult));
return output;
} |
string[] files = Directory.GetFiles(System.IO.Path.GetTempPath());
foreach (string tempFile in files)
{
FileInfo fileInfo = new FileInfo(tempFile);
if (fileInfo.Extension == ".txt" && fileInfo.Name.Contains("Syncfusion_PDFviewer_"))
{
fileInfo.Delete();
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.