We are using GroupDocs.Viewer for .NET 17.11 and trying to migrate to the latest version (20.3, 20.4).
Is there anyway to set specifying HTML resource prefix when resources for the document are obtained via some REST API method?
HtmlOptions options = new HtmlOptions();
options.HtmlResourcePrefix = http://example.com/api/pages/{page-number}/resources/{resource-name};
List pages = htmlHandler.GetPages(fileStream, guid, options);
var htmlResoures = list.Where(i => i.PageNumber == page).Select(i => i.HtmlResources);
Stream stream = _viewerHtmlHandler.GetResource(guid, htmlResoures);
Another question, is it possible to retrieve stream when rendering a document as PDF in version 20.4?
// use container.Stream to manipulate pdf representation of the input file.
var container = viewerImageHandler.GetPdfFile(fileStream, fileName);
return container.Stream;
We have an update on VIEWERNET-2420. You can specify any resource prefix. Please download this sample_app.zip (309.7 KB). It demonstrates how to set HTML resource path (we shared two options to set resource path), the output will contain your resource path like this html_resources.png (325.9 KB). Both options in the sample application serve the same purpose.