Hello,
Could you please confirm the maximum PDF file size limit (in MB/GB) supported by the Doconut Viewer for viewing PDFs in the application?
Currently, we are testing a PDF file of approximately 485 MB with 1,595 pages , but the file is not opening properly in the Doconut Viewer.
Could you also confirm the maximum number of pages supported for a PDF document?
We need this information to determine the maximum PDF file size and page count that can be accepted by our application and to communicate the supported limits to the client.
Hi @Mohit_Tandel,
Doconut has no fixed limit on the number of pages or on the file size, so your 485 MB, 1,595-page PDF
is not being rejected by a product limit. Pages are rendered on the server one at a time, as the
browser asks for them.
The practical limit is the memory of your server. While a document is open, the server holds the file
(budget at least its size on disk) plus every page already viewed, for each user who has it open. So
the limit to give your client depends on your server and on how many documents are open at once. The reliable way to set it is to test your largest file on a server like the production one.
For PDFs this large, these help:
CachePages = false on PdfConfig, so viewed pages are not kept in memory.
- A lower
ImageResolution on PdfConfig. The default is 200; try 100 to 150.
- A shorter
TimeOut (the default is 60 minutes) and a call to CloseDocument when the user leaves,
so the memory is released sooner.
- Running the application as 64-bit.
For documents this large we recommend the background publishing mode. It renders the document once, in the background, and then serves its pages from a shared folder or from cloud storage. The web application then does not hold the document in memory for each user who views it, and the viewer opens as soon as the first page is ready.
This mode belongs to the architecture we introduced with Doconut.NET8 and have kept improving since. As of 26.9.0 all four packages share that architecture: Doconut.NET8, Doconut.NET6, Doconut.NETStandard and, new in this release, Doconut.NETFramework. If you are on an older version, tell us which one and we will explain what the update involves.
To see why this file does not open, please send us:
- The Doconut package and version, and your .NET version.
- What happens exactly: the error text, a viewer that never finishes loading, or blank pages.
- The memory of the server, and whether the application runs as 32-bit or 64-bit.
- How the file reaches the viewer (a path, a stream, an upload) and the configuration you pass when opening it.
If you can share the file, we will test it here.
Hi Gabriel,
Thank you for the detailed information.
Please find our environment and issue details below:
Doconut Package: Doconut.NETStandard 25.10.0
Dot Net Version: .NET core 6.0
Issue: We are getting the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
The Doconut viewer successfully displays the PDF cover page, but subsequent pages are not rendered correctly. Page 2 displays a red X/error icon,
and the remaining pages do not display the actual document content. Please investigate and resolve the page-rendering issue to ensure that all
PDF pages display correctly.
Application: Running in 64-bit mode.
Document Input: The PDF is passed to the viewer through a URL.
The PDF size is approximately 485 MB with 1,595 pages.
We have attached a screenshot showing the issue.
image.png (2.4 KB)
Please let us know if you need any additional configuration details or if there are any recommended settings for handling this large PDF.
Thanks.
Hi @ravi0092,
Thank you for the details: Doconut.NETStandard 25.10.0 on .NET 6, 64-bit, the PDF loaded from a URL, and the NullReferenceException after the first page. That gives us what we need to start.
We are investigating it and will get back to you shortly. If you can share the PDF, or a smaller file that shows the same behaviour, it will help us reproduce it on our side.