Hi Usman,
We tried using GetPages() method with both parameter, though it is throwing exception of ‘GroupDocs.Foundation.Exception.GroupDocsException’.
Attached is the screenshot of that error.
could you please use the Default.aspx.cs page of sample solution provided from Groupdocs and pin down all the changes, code example which required to execute this method.
currently the error code is below.
private static List GetHtmlPages(string filePath, HtmlOptions htmlOptions, out List cssList)
{
var htmlHandler = (ViewerHtmlHandler)HttpContext.Current.Session[“htmlHandler”];
var htmlPages = htmlHandler.GetPages(_streams[filePath], htmlOptions); //Exception here
//Some more code.
}
The _stream[filePath] is giving correct stream as I have already created a local copy from that stream without any error.
Beside from this, I can see from sample example that you are using below code
public static ViewDocumentResponse ViewDocument(ViewDocumentParameters request)
{
if (Utils.IsValidUrl(request.Path))
request.Path = DownloadToStorage(request.Path);
else if (_streams.ContainsKey(request.Path))
request.Path = SaveStreamToStorage(request.Path); // Create Local copy: Not Required
//Some code here
}
if this code is already creating local file they how can we avoid this or what code should we use to replace above code.
2. I have checked the cache clean method, it does only delete files from the Temp folder inside Cache. It does not delete those local files which is created using SaveStreamToStorage()
Could you please suggest how could we delete that local file from your CacheClean Method.
Please consider 1 point as desirable solution for us(not to create local file at all).
Thanks
Puneet Rajak