We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problems saving pdf to the local server in the viewer.GetDocumentAsync() function.

Hi, I tried to save a PDF document on the local server, but when I did I had a problem, viewer.GetDocumentAsync() cannot find the document and it returns null, I tried to test it with File.ReadAllBytes() and it returns the document bytes correctly, but the problem is that it does not read the bytes of the document. That’s why you will need to use the viewer.GetDocumentAsync() function to read the byte of the updated document What solution do you recommend? , if you need more information tell me.

Thank you.




2 Replies

OT Oriol Torrent Roura January 17, 2023 12:01 PM UTC

I leave a screenshot of the component definition that I forgot:




VV Visvesvar Venkatesan Syncfusion Team January 18, 2023 03:19 PM UTC

We were unable to reproduce the reported issue with the provided details. We have shared the sample in which we have tried to reproduce the issue in the below link,

Sample - https://www.syncfusion.com/downloads/support/directtrac/general/ze/LOAD_S~2-1063515199.zip


We were able to save the PDF document by using your code snippet and we did not get any error like “ attempting to reconnect to server”.


Video - https://www.syncfusion.com/downloads/support/directtrac/general/ze/SAVING~1540551872.zip


Try this sample and revert to us with the following details, if you have any concerns about this. This will be helpful for us to analyze further and provide the details.


  • Modified sample or share the sample in which the issue is reproduced.
  • Code snippet
  • Replicate procedure
  • Conform the client and server-side packages are the latest one


This will be helpful for us to analyze further and provide the details.

Note: We can also save the document as mentioned in the below UG document. We have also provided the Github sample in the documentation.


UG Link: https://blazor.syncfusion.com/documentation/pdfviewer/how-to/get-data-from-pdf-viewer


Loader.
Live Chat Icon For mobile
Up arrow icon