Export annotations function returns Object reference not set to an instance of an object.

Hello All,


I'm using PdfViewerController net core webApi for my angular pdf viewer. The issue happens when you leave the pdf loaded for 10 minutes sync fusion invalidates the cache and Export annotaion fucntion return the following error: Object reference not set to an instance of an object. 

Export API : 
[AcceptVerbs("Post")]
        [HttpPost("ExportAnnotations")]
        [Microsoft.AspNetCore.Cors.EnableCors("MyPolicy")]
        [Route("[controller]/ExportAnnotations")]
        //Post action to export annotations
        public IActionResult ExportAnnotations([FromBody] Dictionary<string, string> jsonObject)
        {
            PdfRenderer pdfviewer = new PdfRenderer(_cache);
            string jsonResult = pdfviewer.GetAnnotations(jsonObject);

            return Content(jsonResult);
        }
The highlighted line return the mentioned error. 
This happens after 10 minutes of calling load API.

Angular Call : 
this.pdfviewerControl.exportAnnotationsAsObject()


I've attached the webAPI file.

Thanks,
Mohamed




Attachment: PdfViewerController_430879cb.rar

3 Replies 1 reply marked as answer

AA Akshaya Arivoli Syncfusion Team August 18, 2020 01:43 PM UTC

Hi Mohamed, 

Thank you for contacting Syncfusion support. 

We can reproduce the reported issue randomly, however we will analyze further on it and update you with more details on August 20, 2020 

Regards, 
Akshaya  



MS Mohan Selvaraj Syncfusion Team August 20, 2020 03:58 PM UTC

Hi Mohamed,  

We confirm that the reported issue is a defect and the fix for this issue will be provided on September 2nd  weekly NuGet release. 


Regards,  
Mohan S


AA Akshaya Arivoli Syncfusion Team September 3, 2020 11:15 AM UTC

  
We have fixed the reported issue and the fix was included in our latest weekly NuGet release v18.2.0.56. Kindly upgrade to that version to resolve it  
 
 
Packages link:     
      
Client side package     
    
Blazor Client   
Blazor Sever  
Service side package     
ASP.NET Core :     
      
ASP.NET MVC:     
    
CDN links:    
    
    
Regards,    
Akshaya    

Regards,  


Marked as answer
Loader.
Up arrow icon