PdfViewerController / PdfRenderer caching
Hi. I have about 30 PDF documents, about 10 of which are 300 pages long. The documents change every 6 months. My Blazor client app is used by multiple users to view the documents. I am using pretty much the PdfViewerController example code provided by Syncfusion.
Can you suggest or do you have an example that might speed things up? I was thinking that perhaps the rendered pages could be cached to disk so that there is no need to process them over and over. Your thoughts?
Regards,
Arthur
SIGN IN To post a reply.
4 Replies
1 reply marked as answer
AA
Akshaya Arivoli
Syncfusion Team
October 5, 2020 12:51 PM UTC
Hi Arthur,
Thank you for contacting Syncfusion support.
In our PDF Viewer, we will store the document data in the memory or redis with the hashId. While loading the PDF document, we will generate the hash id for each document, if the hash id is already exists in the cache, then we will not store them in the cache. We will maintain the document live count and based on the users count, it will be increment or decrement and if all the user has closed the window or unload the document , then the document live count will be zero and then we will remove the stored data from the cache. Also, if the PDF document page is rendered then the page details will be preserved in browser session storage and used for further rendering, if a document is unloaded it will be removed from the session.
Please revert us with more details if any concerns.
Regards,
Akshaya
Marked as answer
sir how can resolve this
"Document Reference pointer does not exist in the cache" asp.net mvc
DM
Dhivyabharathi Mohan
Syncfusion Team
December 8, 2021 01:41 PM UTC
Hi Atul,
In the load balancing environment, the request will be sent to different server machines, in which the cache data will not be available. However, we have implemented the feature ‘Achieve load balancing environment in MVC framework’ and shared the PDF Viewer web-service sample. Kindly download it from the below link. Please find the steps to configure the cache in your application to get the issue resolved.
Web service: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfViewer_WebAPI_Service_(3)1568224382.zip
Kindy refer the below documentation for more details about using the Redis cache in your end.
Kindly try this and let us know if you have any concerns about this.
Regards,
Dhivya.
DM
Dhivyabharathi Mohan
Syncfusion Team
December 8, 2021 02:15 PM UTC
Hi Atul,
We suspect that the Redis server is not started in your environment. So, the reported issue occurs. We suggest you follow the steps from the below link to start the Redis server and then configure the Redis in the MVC sample using the below link.
Steps to run the Redis server: https://riptutorial.com/redis/example/29962/installing-and-running-redis-server-on-windows
Steps to configure the Redis in the MVC sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/STEPST~1-36115846.zip
Code snippet to set the connection string:
|
public string redisconnectonstring = "xxxx ,syncTimeout=100000";
|
Commands in Redis terminal:
|
keys *
flushall |
Kindly try this and revert us, if you have any concerns.
Regards,
Dhivya.
SIGN IN To post a reply.
- 4 Replies
- 4 Participants
- Marked answer
-
AB Arthur Butler
- Oct 3, 2020 05:06 AM UTC
- Dec 8, 2021 02:15 PM UTC