Hi,
I am trying to render the txt file as htmlview using groupdocs evaluation version. We need to preview a lots of documents and most of them working fine in this way. We are planning to buy the license once after the evaluation of this product.
But when I tried to render the .txt file using the following code , its hangs in between and unable to proceed. Please find below code.
string imageFilesPath = Path.Combine(imageFilesFolder, “page-{0}.html”);
storagePath = _configuration.GetSection(“StorageContainerAddress”)?.Value + “/” + storagePath;
try
{
using (Viewer viewer = new Viewer(() => GetRemoteFile(storagePath)))
{
MemoryPageStream pageStreamFactory = new MemoryPageStream(pages);
ViewInfo info = viewer.GetViewInfo(ViewInfoOptions.ForHtmlView());
pageCount = info.Pages.Count;
//HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageStreamFactory);
//viewer.View(options);
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(imageFilesPath);
viewer.View(options);
return new JsonResult(pageCount);
}
} catch(Exception ex)
Highly Appreciate your immediate response. I am able to do this for pdf, jpg, png, dwg etc.