SfPdfViewer component erreur Syncfusion.EJ2.PdfViewer.PdfiumNative' threw an exception on load pdf on web assembly

Hello,

I'm considering your UI kit to be used in my project, but I'have a problem with the SfPdfViewer 

The component SfPdfViewer works great on windows but on the mac environnement with visual studio for mac I have this erreur on load pdf Syncfusion.EJ2.PdfViewer.PdfiumNative' threw an exception.

When I start my application on the document viewer tab, the pdf not load and in the code I saw Syncfusion.EJ2.PdfViewer.PdfiumNative' threw an exception on pdfviewer.Load(stream, jsonObject) result.
I saw an other thread on this subject but nothing seems to work : https://www.syncfusion.com/forums/151628/the-type-initializer-for-syncfusion-ej2-pdfviewer-pdfiumnative-threw-an-exception

I send you in attachement a sample project to reproduce


Thanks,


Best regards,

Nicolas



Attachment: BlazorAppPOC_2_7eac77d3.zip

10 Replies 1 reply marked as answer

NN Nicolas NOEL February 19, 2021 04:02 PM UTC

I Attache print screen

Attachment: capture_ecran_pb_syncfusion_load_pdf_on_mac_a0cb78ee.zip

I use the last version of visual studio 8.8.10 (build 2)


DM Dhivyabharathi Mohan Syncfusion Team February 22, 2021 09:23 AM UTC

Hi Nicolas, 
 
 
Currently we are checking on your query with the provided details in the MAC platform. We will provide further details on 24 February 2021. 
 
 
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team February 24, 2021 11:56 AM UTC

Hi Nicolas,  
  
Based on the provided details, we suspect that you are using Syncfusion.Blazor.PdfViewerServer.Windows NuGet package in the mac platform, so that the issue occurs. Kindly use the Syncfusion.Blazor.PdfViewerServer.OSX NuGet package to work with mac environment. We have shared the UG documentation for your reference.  
  
  
Kindly try it and revert to us, if you have any concerns about this.  
  
Regards,  
Dhivya. 



NN Nicolas NOEL March 1, 2021 05:26 PM UTC

Hi Dhivya,
I'm using on the server side project this dll Syncfusion.EJ2.PdfVierwer.AspNert.Core.Windows. Ok on mac there is a problem with this dll, but witch remplacement dll I can use ?
I send you in attachement the suggestion on nuget manager.
regards,
Nicolas

Attachment: Capture_d’écran_20210301_à_18.11.28.png_1d5cef90.zip


DM Dhivyabharathi Mohan Syncfusion Team March 2, 2021 09:32 AM UTC

Hi Nicolas, 
 
We have checked the attached screenshot. We suspect that you are using Syncfusion.EJ2.PdfVierwer.AspNet.Core.Windows NuGet in mac environment. So that the issue occurs. Kindly use the Syncfusion.EJ2.PdfVierwer.AspNert.Core.OSX to work with mac environment.  
 
 
Kindly try it and revert us, if you have any concerns. 
 
Regards, 
Dhivya. 



NN Nicolas NOEL March 5, 2021 02:33 PM UTC

Hi Dhivya,

Thanks you for the direct link I don't know why my nuget manager don't suggested me this package

And I have an another question I want to host the serveur on linux docker, so if I follow the logic I must change the dll for this one :
Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux

It's compatible for all distribution ? CentOs, Debian ?

Thanks
Nicolas


DM Dhivyabharathi Mohan Syncfusion Team March 8, 2021 11:40 AM UTC

 Hi Nicolas, 
 
We have shared the sample for host the server in  Linux Docker. And also shared the KB link. We will ensure that Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux NuGet will be compatible or not for Debian and CentOs and provide the further details on March 10th, 2021. In the meantime, Kindly try this and let us know if you have any concerns. 
 
KB link: 
 
 
 
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team March 11, 2021 03:50 PM UTC

Hi Nicolas, 
 
Currently  facing issue in loading the PDF document in CentOS  and DebianOS . We are currently analyzing further on resolving the reported issue, so we will update the further details on 15th  March 2021. 
 
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team March 15, 2021 03:52 PM UTC

Hi Nicolas, 


Sorry for the inconvenience . We are facing the below script error while checking in DebianOs and CentOs. Still, we are analyzing this with high priority. We need some time to analyse and resolve these issues and  update the further details on 17 March 2021 

 
 
   
 

Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team March 17, 2021 02:46 PM UTC

Hi Nicolas, 
 
 
Thank you for your patience. 
 
 
We have checked the attached sample in DebianOs and CentOs. In our PDF Viewer we are using pdfium libraries to render the PDF documents. We suspect that the pdfium dependencies are missed in the sample which you have shared. Kindly use the below commands to install the dependencies in your machine. 
 
We have installed the following dependencies via root terminal: 
 
For CentOs: 
              
 
yum install -y   glibc-devel  
yum install -y wget
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libX11-devel-1.6.7-2.el7.x86_64.rpm yum install libX11-devel
 
//Navigate to web-service project and use the below command   
export LD_LIBRARY_PATH=/lib64/ 
 and then executed dotnet run. 
 
 
 
 
For DebianOs; 
 
 apt-get update && apt-get install -y --allow-unauthenticated libgdiplus libc6-dev libx11-dev 
  //Navigate to web-service project and use the below command 
  dotnet run. 
 
 
 
Kindly try it and revert us, if you have any concerns about this. 
 
 
Regards, 
Dhivya. 


Marked as answer
Loader.
Up arrow icon