"The type initializer for 'Syncfusion.Blazor.PdfViewer.PdfiumNative' threw an exception."

Hello, I have blazor web assembly project with pdf viewer. While debugging It works as expected, PDF is renedered and all that. However when I deploy application to production server (Windows IIS) I am getting this error on Load action:

"The type initializer for 'Syncfusion.Blazor.PdfViewer.PdfiumNative' threw an exception."


I read that I might be missing some pdfium.dll however I am not sure where to place it....

.NET 6

Syncfusion.Blazor.PdfViewerServer.Windows -> 20.1.0.56

any ideas where I should start looking for clues?


4 Replies

SK Shamini Kiruba Sobers Syncfusion Team May 24, 2022 05:17 PM UTC

Hi Eimantas,


We are analyzing your requirement and we will update the details on or before May 26, 2022.


Regards,

Shamini



SK Shamini Kiruba Sobers Syncfusion Team May 25, 2022 10:16 AM UTC

Hi Eimantas,


Kindly look into the below UG link to resolve the Pdfium issue and let us know if it helps.

https://ej2.syncfusion.com/aspnetcore/documentation/pdfviewer/how-to/resolve-pdfium-issue


Regards,

Shamini



AG Anthony Griggs September 22, 2022 03:43 PM UTC

I am having this exact same issue. However I am using this in a .Net Core Web API project. I've applied the all the recommended steps in the given link. Now it works with some files... bit still produces the same error with  others?



SK Sinthiya Kalimuthu Syncfusion Team September 23, 2022 08:45 AM UTC

Hi Anthony,


If you have a Pdfium issue, the documentation will help to resolve it. As we are not clear with your error details, we request you to share the error details. Also, share your server or the production environment details. Kindly share the files which you have tried. This will be helpful to investigate further and provide the solution at the earliest.


Regards,

Sinthiya K



Loader.
Up arrow icon