I am setup on a trial for GroupDocs Viewer application and I cannot seem to get it to work. I get an exception mentioned in the subject of this post. Below is my code. It is important to note that this is a .Net Core website that is using WebAPI to call a .Net Framework 4.7.1 project which is where the GroupDocs code below is coming from.
The exception gets thrown at the line: List pages = htmlHandler.GetPages(guid, options);
License lic = new License();
lic.SetLicense(@"C:\Q2Attachments\GroupDocs.Total.lic");
ViewerConfig config = new ViewerConfig();
//set the storage path
config.StoragePath = @"C:\Q2Attachments\FileAttachments\2017\11\";
config.CachePath = @"C:\Q2Attachments\FileAttachments\2017\11\";
config.CacheFolderName = "Cache";
config.UseCache = false;
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
// Guid implies that unique document name
string guid = $"{config.StoragePath}1ba42029-fa9a-4e4f-b9f4-91d26723e158.pdf";
//Instantiate the HtmlOptions object
HtmlOptions options = new HtmlOptions();
//to get html representations of pages with embedded resources
options.IsResourcesEmbedded = true;
//Get document pages in html form
List<PageHtml> pages = htmlHandler.GetPages(guid, options);
List<HtmlInfo> contents = new List<HtmlInfo>();
foreach (PageHtml page in pages)
{
HtmlInfo htmlInfo = new HtmlInfo();
htmlInfo.HtmlContent = page.HtmlContent;
htmlInfo.PageNmber = page.PageNumber;
contents.Add(htmlInfo);
}