SfPdfViewerServer: Hangs with spinner when trying to call Load() with a large base64 image

It seems that when I try to load a PDF using binary base64 data in the load method of the SFPdfViewerServer control, the viewer will just display the spinner forever. It seems to be when the size of the base64 string is bigger then about 20K.

Is this a restriction of the control, or is it a bug? Nothing about size is mentioned in the documentation.

Thanks,
--Dave

4 Replies 1 reply marked as answer

AA Akshaya Arivoli Syncfusion Team August 3, 2020 12:16 PM UTC

Hi Dave, 

Thank you for contacting Syncfusion support. 

We are unable to reproduce the reported issue with the provided details. So can you please revert us with more details about your issue,  sample, PDF document, base64string, code snippet  and replication procedure. These details will be helpful for us to investigate further and assist you better.  


Regards, 
Akshaya  



DK Dave Kompel August 26, 2020 07:03 PM UTC

Sorry got pulled away on another emergency, so that's why it took so long to get back to you.

Let me give you a lot more info, now that I have it.

When running on windows, using the Syncfusion.Blazor.PDFViewerServer.Windows package it works great. It's loading PDFs from a binary field in a database, all is good.

When I Change the package to Syncfusion.Blazor,PDFViewerServer.Linux, and build and run the exact same code on a Linux system, it hangs with the spinner forever, does not log any errors, just hangs. I get the same results if I build it on Linux box and run from shell, or build a Linux docker image on windows, and run it in a Kubernetes cluster.

Is there some extra stuff that must be installed on Linux for it to work? Are there only specific versions/distors that it works on?

Just a note I did update to the latest weekly release today.


MS Mohan Selvaraj Syncfusion Team August 27, 2020 08:33 AM UTC

Hi Dave,  

We will check the reported issue on the Linux environment and update you the details on August 31st 2020. In the meanwhile can you please share us the PDF document or the base64 string in which you have faced the issue. So that would be helpful for us to analysis more and assist you better. 


Regards, 
Mohan S


MS Mohan Selvaraj Syncfusion Team September 1, 2020 02:55 PM UTC

Hi Dave 

We suspect that the reported issue is due to limit in the buffer size. The Blazer application uses SignalR connection to manage communication between the server and client. By default, SingalR limits the buffer size to 32 KB. So, increase the buffer size of the blazor application to upload large documents from client to server. To increase the connection buffer size, set MaximumReceiveMessageSize property shown below in the startup.cs file with in (ConfigureServices) method 

   public void ConfigureServices(IServiceCollection services) 
        { 
            services.AddRazorPages(); 
            services.AddServerSideBlazor(); 
            services.AddSyncfusionBlazor(); 
            services.AddSingleton<WeatherForecastService>(); 
            services.AddServerSideBlazor().AddHubOptions(o => { o.MaximumReceiveMessageSize = 102400000; }); 
 
        } 
So can you please add the highlighted line in your end and kindly revert if there is any concern. 

Regards, 
Mohan S    


Marked as answer
Loader.
Up arrow icon