GetBarcodeImage Error while trying to view the document in GroupDocs Viewer

I am getting the error on below function

if (loadAllPages)
{
    customViewer.CreateCache();
}

dynamic viewInfo = customViewer.GetViewer().GetViewInfo(ViewInfoOptions.ForHtmlView());
LoadDocumentEntity loadDocumentEntity = new LoadDocumentEntity();

if (!Directory.Exists(cachePath))
{
    Directory.CreateDirectory(cachePath);
}

TryCreatePagesInfoXml(fileCacheSubFolder, viewInfo, out string pagesInfoPath);

foreach (Page page in viewInfo.Pages)
{
    PageDescriptionEntity pageData = GetPageInfo(page, pagesInfoPath);
    if (loadAllPages)
    {
        pageData.SetData(GetPageContent(page.Number, documentGuid, cachePath, "N"));
    }

    loadDocumentEntity.SetPages(pageData);
}

loadDocumentEntity.SetGuid(documentGuid);
return loadDocumentEntity;

on the below line

dynamic viewInfo = customViewer.GetViewer().GetViewInfo(ViewInfoOptions.ForHtmlView());

and the error is

Method ‘GetBarcodeImage’ in type ‘e’ from assembly ‘GroupDocs.Total, Version=24.6.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ does not have an implementation.

I am updated to Groupdocs.Total Version 24.6.

There are many errors in the current version of the Groupdocs.Total Package and we are using this in our product and it is causing difficulties to our clients. can you please look into this on priority.

NOTE: Error is only coming on docx files

@Niteen_Jadhav

Please attach the file or a page with barcode to reproduce this issue.

I am getting the error on this file
GroupdocsEditor.docx (471.2 KB)

The error is coming while trying to view the file.

the function is →

[HttpPost]
[Route("viewer/loadDocumentDescription")]
public HttpResponseMessage GetDocumentData(PostedDataEntity postedData)
{
    try
    {
        LoadDocumentEntity loadDocumentEntity = GetDocumentPages(postedData, globalConfiguration.GetViewerConfiguration().GetPreloadPageCount() == 0);

        // return document description
        return this.Request.CreateResponse(HttpStatusCode.OK, loadDocumentEntity);
    }
    catch (PasswordRequiredException ex)
    {
        // set exception message
        return this.Request.CreateResponse(HttpStatusCode.Forbidden, new Common.Resources.Resource().GenerateException(ex, postedData.password));
    }
    catch (Exception ex)
    {
        // set exception message
        return this.Request.CreateResponse(HttpStatusCode.InternalServerError, new Common.Resources.Resource().GenerateException(ex, postedData.password));
    }
}
private LoadDocumentEntity GetDocumentPages(PostedDataEntity postedData, bool loadAllPages)
{
    // get/set parameters
    string documentGuid = GetDocumentPath(postedData.guid); //postedData.guid;
    string password = string.IsNullOrEmpty(postedData.password) ? null : postedData.password;

    var fileFolderName = Path.GetFileName(documentGuid).Replace(".", "_");
    string fileCacheSubFolder = Path.Combine(cachePath, fileFolderName);

    if (!File.Exists(documentGuid))
    {
        throw new GroupDocsViewerException("File not found.");
    }

    IViewerCache cache = new FileViewerCache(cachePath, fileCacheSubFolder);

    LoadDocumentEntity loadDocumentEntity;
    var htmlMode = string.IsNullOrEmpty(postedData.IsHTMLMode) ? "false" : postedData.IsHTMLMode;
    if (htmlMode != "false")
    {
        using (HtmlViewer htmlViewer = new HtmlViewer(documentGuid, cache, GetLoadOptions(password)))
        {
            loadDocumentEntity = GetLoadDocumentEntity(loadAllPages, documentGuid, fileCacheSubFolder, htmlViewer);
        }
    }
    else
    {
        using (PngViewer pngViewer = new PngViewer(documentGuid, cache, GetLoadOptions(password)))
        {
            loadDocumentEntity = GetLoadDocumentEntity(loadAllPages, documentGuid, fileCacheSubFolder, pngViewer);
        }
    }

    return loadDocumentEntity;
}

private static LoadDocumentEntity GetLoadDocumentEntity(bool loadAllPages, string documentGuid, string fileCacheSubFolder, ICustomViewer customViewer)
{
    if (loadAllPages)
    {
        customViewer.CreateCache();
    }

    dynamic viewInfo = customViewer.GetViewer().GetViewInfo(ViewInfoOptions.ForHtmlView());
    LoadDocumentEntity loadDocumentEntity = new LoadDocumentEntity();

    if (!Directory.Exists(cachePath))
    {
        Directory.CreateDirectory(cachePath);
    }

    TryCreatePagesInfoXml(fileCacheSubFolder, viewInfo, out string pagesInfoPath);

    foreach (Page page in viewInfo.Pages)
    {
        PageDescriptionEntity pageData = GetPageInfo(page, pagesInfoPath);
        if (loadAllPages)
        {
            pageData.SetData(GetPageContent(page.Number, documentGuid, cachePath, "N"));
        }

        loadDocumentEntity.SetPages(pageData);
    }

    loadDocumentEntity.SetGuid(documentGuid);
    return loadDocumentEntity;
}

on this line → dynamic viewInfo = customViewer.GetViewer().GetViewInfo(ViewInfoOptions.ForHtmlView());

I have checked it and the error is coming on word file and it is working on pdf file.

@Niteen_Jadhav

I can’t reproduce this issue with sample-app.zip (440.0 KB)
I have tried both GroupDocs.Total and GroupDocs.Total.NETFramework 24.6 in .NET 6 and .NET Framework 4.8 applications. Can you please try reproducing this issue with the sample app I have attached?

Hello,

I created a sample application for your reference.

I noticed that the entry point and code structure are different

loadDocumentDescription ← this is my entry point and it executes GetDocumentPages and GetLoadDocumentEntity

can you please try with my code.

File src.zip - Google Drive

please look into this

@Niteen_Jadhav

Thank you for attaching the sample project. I can reproduce this issue

It seems to be a different one.

Please Note: I am not getting any issues if I am using the packages separately

@Niteen_Jadhav

Can you please clarify what do you mean by if I am using the packages separately. Thanks

Ok so we can use either Groupdocs.Total or Groupdocs.Viewer, Groupdocs.Annotation, Groupdocs.Signature

If I use Groupdocs.Total I am facing this error but when I use the second options I am not facing the problem.

Actually, I noticed that the GroupDocs.Total has some errors and the same thing is working in other packages

@Niteen_Jadhav

Got it, can you please share what OS do you use?

I am using windows 8

@Niteen_Jadhav

Thank you for the feedback. We’ll investigate this issue and update you when we have any new information.

@Niteen_Jadhav

I was able to reproduce the issue locally. In can be reproduced when GroupDocs.Total package is used in .NET Framework application. To avoid this issue please use GroupDocs.Total.NETFramework package for .NET Framework applications.