Free Support Forum - groupdocs.com

Big memory use while rendering large pdf (Groupdocs.Viewer for .NET)

Hi,
using your viewer library to render large pdf files (with a lot of pages) we saw that, in the temp folder, there is a lot of files, expecially for the thumbnails… On the other side, there is a large increment of the memory used by w3wp.exe process
Have you any tip to avoid this? Here there is the init of the viewer javascript widget
fileDisplayName: filename,
zoomToFitWidth: true,
locale: “it-IT”,
baseUrl:’’,
showFolderBrowser: false,
showHeader: false,
showThumbnails: true,
useInnerThumbnails: true,
useHtmlThumbnails: false,
width: 650,
height: 900,
useVirtualScrolling: true,
downloadPdfFile: false,
showSearch: true,
usePdfPrinting: true,
enableStandardErrorHandling: false,
preloadPagesCount: 2,
supportPageRotation: true,
viewerStyle: viewerSyle.OnePageInRow,
useHtmlBasedEngine: true,
quality: 100

Many thanks

Gianluca

@gianboscolo,

Thanks for using GroupDocs.Viewer for .NET. Would you please tell us the version of the API you are using? We look forward to hearing from you.

Hi, i’m using the latest, the 17.9!

many thanks

GIanluca

@gianboscolo,

Thanks for your response.

When a document is rendered with ViewerConfig.UseCache property set to true, the API keeps the rendered HTML/image files in the cache. In this case, when a document is rendered again, the API simply picks up the cached content to speed up the document processing time. “temp” folder is used by the API as a default cache folder. To remove the files from the cache folder (temp in your case) API provides ViewerHandler.ClearCache() function. For details, please visit this article.

Please note that the memory consumption and document rendering time depends on multiple factors such as the number of pages, document’s content which can include text, images, tables. Therefore, there is the possibility that some documents consume more memory to get rendered.