Hi
We are looking into sample example which you have shared for the asp.net. In our requirement we need to read file from stream. There is a option to getpages from htmlhandler to pass stream but we are not sure to set following values.
Please let us know how we will get these values in case of stream. Also if we are not passing these value its generating an error in the JavaScript (GroupdocsViwer.all.js) and document is not rendering.
attached is the JS error for details and below is the code we are using.
var docInfo = _htmlHandler.GetDocumentInfo(new DocumentInfoOptions(request.Path));
result.documentDescription = new FileDataJsonSerializer(docInfo.Pages,new FileDataOptions()).Serialize(false);
result.docType = docInfo.DocumentType;
result.fileType = docInfo.FileType;
we are sharing stream example which we are using to get pages
List<string> r = new List<string>();
r.Add(“documentbody”);
DbService dbService = new DbService();
byte[] get = dbService.GetFromDb(“annotation”, r, “AnnotationId”,“a5ddf168-40d6-e511-9430-00155d10122c”);
ByteStream = new MemoryStream(get);
var htmlPages = htmlHandler.GetPages(ByteStream,“Dynamics CRM Online Pricing and Licensing Guide.pdf”);
result.pageHtml = htmlPages.Select( => _.HtmlContent).ToArray();
//NOTE: Fix for incomplete cells document
for (int i = 0; i < result.pageHtml.Length; i++)
{
var html = result.pageHtml[i];
var indexOfScript = html.IndexOf(“script”);
if (indexOfScript > 0)
result.pageHtml[i] = html.Substring(0, indexOfScript);
}
Please share your view and sample example to fix this issue.
Thanks