Unable to View big files in Groupdocs Viewer version 20.8

while trying to view large file (sample drive link → 100% biology selection (1).pdf - Google Drive)

My application is getting stuck.

after debugging I found that the api → viewer/loadDocumentPage is the main culprit.

in the above api we are executing a function named as → GetPageDescritpionEntity from here we are executing customViewer.CreateCache(); in create cache function we are executing this.viewer.View(this.pngViewOptions, missingPages);this.pngViewOptions and the application is getting stuck on the below code →

        PngViewOptions createdPngViewOptions = new PngViewOptions(pageNumber =>
        {
            string fileName = $"p{pageNumber}.png";
            string cacheFilePath = this.cache.GetCacheFilePath(fileName);

            return File.Create(cacheFilePath);
        });

@Niteen_Jadhav

Thank you for adding a link to the source file. It is quite heavy in size but contains only one page. I have also tested it with the latest version of GroupDocs.Viewer and it managed to render PDF to PNG in 5 min. We’ll investigate this issue and share the updates with you here.

Do we have any updates on this? as it is more than 40 days

@Niteen_Jadhav

At the moment there are no updates for this issue. Let me check the current status with the development team.

Thanks a lot for your response, I hope your team will find a solution as soon as possible

@Niteen_Jadhav

Can you please clarify if you’re going to update to the latest version of GroupDocs.Viewer or you stay with 20.8? Thanks

We will update but not at this moment, it will take 2/3 months

@Niteen_Jadhav

Got it. As soon as I have any updates I’ll let you know.

@Niteen_Jadhav

This file can be rendered with GroupDocs.Viewer for .NET 20.8 but it takes about 5 minutes to create PNG file. We’re looking for ways to optimize the rendering or file itself.

Hello, Any updates?

@Niteen_Jadhav

The file is under investigation. We’re looking for a possible ways to optimize this and similar PDF documents.

@Niteen_Jadhav

This issue was fixed in GroupDocs.Viewer for .NET 24.5. You have to use the following code to repair PDF file first and then render it:

using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
// ...

LoadOptions loadOptions = new LoadOptions();
loadOptions.TryRepair = true;

PngViewOptions viewOptions = new PngViewOptions();

using (Viewer viewer = new Viewer("resume.pdf", loadOptions))
{    
    viewer.View(viewOptions);
}

The document contains many heavy images that do not participate in the formation of the resulting display of the document.
In more detail, the page Resources section contains six XObject objects, which in turn contain XObject objects. An example of a small part of this is shown in the attached image. Many objects are essentially garbage. The code above removes garbage objects.

Please let us know if you have any questions.