PDF File is not Loading

Hi Team,

We are facing an issue when we upload these two PDF files. Hence other all PDF files are being loaded properly we area facing an issue with these 2 PDFs.

Attachment: PDFs_88150a2f.rar

5 Replies

AA Akshaya Arivoli Syncfusion Team October 5, 2020 10:39 AM UTC

Hi Christiaan,  

Thank you for contacting Syncfusion support.  

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


Please try it and revert us with more details about your issue and the modified sample if you still have concerns.   

Regards,  
Akshaya    



CC Christiaan Collier replied to Akshaya Arivoli November 10, 2020 11:57 AM UTC

Hi Christiaan,  

Thank you for contacting Syncfusion support.  

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


Please try it and revert us with more details about your issue and the modified sample if you still have concerns.   

Regards,  
Akshaya    


--! URGENT !--

Hi Akshaya,

We reviewed the link you have provided and when we uploaded the PDF files and those are displaying properly.
In our case, we are loading the PDF file from the Azure Blob storage. Please find the attached files and try to re-produce the issue and let us know. Please consider this ticket as the TOP priority since we are stuck up with this issue.

Attachment: Downloads_ca0b07b9.rar


AA Akshaya Arivoli Syncfusion Team November 11, 2020 11:39 AM UTC

Hi Christiaan ,   
 
Thank you for your update.   
 
Based on the provided details, we suspect that the reported issue is due to position of the stream in the load method. So, can you add the below highlighted line in the load method of the controller class.    
 
[System.Web.Mvc.HttpPost]   
        public ActionResult Load(jsonObjects jsonObject)   
        {   
            PdfRenderer pdfviewer = new PdfRenderer();              
            MemoryStream stream = new MemoryStream();   
            var jsonData = JsonConverter(jsonObject);   
            object jsonResult = new object();   
            if (jsonObject != null && jsonData.ContainsKey("document"))   
            {   
                if (bool.Parse(jsonData["isFileName"]))   
                {   
                    string documentPath = GetDocumentPath(jsonData["document"]);   
 
                    if (!string.IsNullOrEmpty(documentPath))   
                    {   
                        byte[] bytes = System.IO.File.ReadAllBytes(documentPath);                         
                        stream = new MemoryStream(bytes);   
                    }   
                    else   
                    {   
                        string fileName = jsonData["document"].Split(new string[] { "://" }, StringSplitOptions.None)[0];   
                        if (fileName == "http" || fileName == "https")   
                        {   
                            var WebClient = new WebClient();   
                            byte[] pdfDoc = WebClient.DownloadData(jsonData["document"]);   
                            stream = new MemoryStream(pdfDoc);   
                        }   
                        else   
                        {   
                            return this.Content(jsonData["document"] + " is not found");   
                        }   
 
                    }   
                }   
                else   
                {   
                    byte[] bytes = Convert.FromBase64String(jsonData["document"]);   
                    stream= new MemoryStream(bytes);                       
                      
                }   
            }   
stream.Position = 0;    
            jsonResult = pdfviewer.Load(stream, jsonData);   
            return Content(JsonConvert.SerializeObject(jsonResult));   
        }   


 
If you are still facing the issue, can you provide the sample, code snippet for loading the document from Azure blob, format of the PDF document(base64 string/stream) which you are loading and the replication procedure. So that would be helpful for us to analysis more and assist you better.    
 
Regards,   
Akshaya    



CC Christiaan Collier December 2, 2020 07:21 PM UTC

Hi Akshaya,

We have already tried the resolution as suggested. But that is not working. We have analyzed something and we observed some un-known behavior. Please find the attached document file for more details.

Can we schedule a meeting where we can sit and

Attachment: Verify_Val's_PDF_resolution_Observation_842f664a.rar


AA Akshaya Arivoli Syncfusion Team December 3, 2020 06:01 PM UTC

Hi Christiaan, 

We have created new incident under your account. Kindly follow that for further updates. 

Regards, 
Akshaya  


Loader.
Up arrow icon