Hi,
I'm encountering an error while working with the ASP.NET Core PDF Viewer Web Service example provided by Syncfusion. The error message I'm seeing is:
"The type initializer for 'Syncfusion.PdfToImageConverter.PdfiumNative' threw an exception."
I've followed the instructions provided in the GitHub repository (https://github.com/SyncfusionExamples/EJ2-PDFViewer-WebServices/tree/main/ASP.NET%20Core/PdfViewerWebService_8.0) to set up the project and also followed the instruction given in the thread (https://www.syncfusion.com/forums/151628/the-type-initializer-for-syncfusion-ej2-pdfviewer-pdfiumnative-threw-an-exception ) and Pdfium dll is generating on runtime within my project location (/EJ2-PDFViewer-WebServices/ASP.NET Core/PdfViewerWebService_8.0/PdfViewerWebService_8.0/wwwroot\/x64\/libpdfium.so)
Hi Ifra,
We recommend using
the "Syncfusion.EJ2.PdfViewer.AspNet.Core"NuGet
package, which is compatible with Windows, Linux, and OSX platforms and also,
please remove the Reference path and try once.
If you are using the PDF Viewer with Docker in .NET 6.0 framework, please refer to the following Dockerfile and modify your Dockerfile accordingly:
If you are using the PDF Viewer with Docker in .NET 8.0 framework, please refer to the following Dockerfile and modify your Dockerfile accordingly:
If you are still facing any issues, please provide the following details, which will help us analyze further and provide assistance: