PDF Viewer - RenderPdfPages Slow

Syncfusion.EJ2.PdfViewer Version: 19.3450.0.44

Within our ASP.NET MVC app we are using the Syncfusion PDF Viewer control. For PDFs with a large amount of pages, when you scroll through the PDF the RenderPdfPages call seems to take longer and longer.

For example if you quickly scroll through the PDF (resulting in lots of RenderPdfPages calls) it seems the response time grows and grows. (See attached 'Quickly scrolling through the PDF.png' - this is from Chrome Dev Tools).

Compared to if you scroll page by page through the PDF the response times are quicker. (See attached 'Slowly scrolling through the PDF.png' - this is from Chrome Dev Tools )

To me it almost seems as though the requests are blocking? Ultimately this results in what appears to be a very slowly loading PDF pages as it's normal to quickly scroll through a PDF.

Is this expected behaviour and are there any workarounds? E.g. pre-caching of PDF pages for rendering so that the RenderPdfPages calls for the upcoming pages are already rendered so it appears quick.


Attachment: Syncfusion_PDF_Viewer_Images_f171328c.zip


1 Reply

VS Vasugi Sivajothi Syncfusion Team November 8, 2021 11:15 AM UTC

Hi Andrew, 
 
Thank you for contacting Syncfusion support. 
 
Syncfusion PDF Viewer control is client-server oriented. If we load the document from the client-side, it will send a request with JSON object details to load web action method on the server-side and returns the document information like document id, hash id, page count, and size of the first 100 pages to the client for loading the PDF document in PDF viewer and send another request asynchronously to get remaining page details like page size of the PDF document. We will get the first two-page details like page text content and text bounds and annotations from the server and render the first two pages of the PDF document on the client-side. Then we will render the remaining pages on demand by scrolling the pages in the PDF Viewer control. The loading time depends on the weightage of the content in the PDF pages. Kindly share the PDF document in which you are facing the issue if you have any concerns. This will be helpful for us to investigate further and assist you better. 
 
However, we have already considered the feature request “Support to render all the pages of the PDF document during initial loading” and we do not have any immediate plans to implement it. At the planning stage for every release cycle, we review all open features. We will let you know when this feature is implemented.    
 
You can track the status of the implementation with the below feedback link,    
 
 
Regards, 
Vasugi. 


Loader.
Up arrow icon