Pdf Viewer Server don't load pdf

I am using Fedora Linux and every time when i want to load an PDF with an Blazor Serverside application i get this error
syncfusion-blazor.min.js:1 Unexpected token T in JSON at position 0
SyntaxError: Unexpected token T in JSON at position 0
    at JSON.parse (<anonymous>)
    at t.o.pageRequestHandler.onSuccess (https://localhost:5001/_content/Syncfusion.Blazor/scripts/pdfviewer-0cd524.min.js:1:1014671)
    at t.successHandler (https://localhost:5001/_content/Syncfusion.Blazor/scripts/pdfviewer-0cd524.min.js:1:1101137)
    at Object.ioSuccessHandler (https://localhost:5001/_content/Syncfusion.Blazor/scripts/syncfusion-blazor.min.js:1:178684)
    at https://localhost:5001/_framework/blazor.server.js:8:31421
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:8:31390)
    at https://localhost:5001/_framework/blazor.server.js:1:19202
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:19173)
throwError @ syncfusion-blazor.min.js:1
ioSuccessHandler @ syncfusion-blazor.min.js:1
(anonymous) @ blazor.server.js:8
beginInvokeJSFromDotNet @ blazor.server.js:8
(anonymous) @ blazor.server.js:1
e.invokeClientMethod @ blazor.server.js:1
e.processIncomingData @ blazor.server.js:1
connection.onreceive @ blazor.server.js:1
i.onmessage @ blazor.server.js:1

Any ideas how can i fix this

1 Reply

AA Akshaya Arivoli Syncfusion Team April 9, 2020 02:15 PM UTC

Hi Moritz  , 

Thank you for contacting Syncfusion support. 

We suspect that you are referring Windows NuGet in Linux environment. Can you please install Syncfusion.Blazor.PdfViewerServer.Linux in you sample to work with Linux environment. Please refer to the below link, 




We have shared simple PDF Viewer sample in the below link, 




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

Regards, 
Akshaya 


Loader.
Up arrow icon