Welcome to the ASP.NET Core feedback portal. We’re happy you’re here! If you have feedback on how to improve the ASP.NET Core, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I'm trying to run the PdfViewer on my laptop running Manjaro Linux.
It's not quite clear from the documentation what distributions the EJ2.PdfViewer supports, and what dependencies needs to be installed on each distribution.
My API.csproj looks like this:
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux" Version="20.4.0.43" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Osx" Version="20.4.0.43" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Windows" Version="20.4.0.43" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />And I have set up a Controller that looks similar to your example at https://ej2.syncfusion.com/aspnetcore/documentation/pdfviewer/getting-started#add-aspnet-core-pdf-viewer-control but instead loads the pdf stream from Azure Storage. In the function corresponding to `OnPostLoad` in your example this line doesn't return the correct result. Instead it gives an error message.
jsonResult = pdfviewer.Load(stream, jsonObject);
// jsonResult is a string with content: The type initializer for 'Syncfusion.EJ2.PdfViewer.PdfiumNative' threw an exception.
System.TypeInitializationException: The type initializer for 'Syncfusion.EJ2.PdfViewer.PdfiumNative' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libdl.so' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/simon/Code/Api/bin/Debug/net7.0/runtimes/linux-x64/native/libdl.so.so: cannot open shared object file: No such file or directory
/home/simon/.dotnet/shared/Microsoft.NETCore.App/7.0.0/libdl.so.so: cannot open shared object file: No such file or directory
/home/simon/Code/Api/bin/Debug/net7.0/libdl.so.so: cannot open shared object file: No such file or directory
/home/simon/Code/Api/bin/Debug/net7.0/runtimes/linux-x64/native/liblibdl.so.so: cannot open shared object file: No such file or directory
/home/simon/.dotnet/shared/Microsoft.NETCore.App/7.0.0/liblibdl.so.so: cannot open shared object file: No such file or directory
/home/simon/Code/Api/bin/Debug/net7.0/liblibdl.so.so: cannot open shared object file: No such file or directory
/home/simon/Code/Api/bin/Debug/net7.0/runtimes/linux-x64/native/libdl.so: cannot open shared object file: No such file or directory
/home/simon/.dotnet/shared/Microsoft.NETCore.App/7.0.0/libdl.so: cannot open shared object file: No such file or directory
/home/simon/Code/Api/bin/Debug/net7.0/libdl.so: cannot open shared object file: No such file or directory
/home/simon/Code/Api/bin/Debug/net7.0/runtimes/linux-x64/native/liblibdl.so: cannot open shared object file: No such file or directory
/home/simon/.dotnet/shared/Microsoft.NETCore.App/7.0.0/liblibdl.so: cannot open shared object file: No such file or directory
/home/simon/Code/Api/bin/Debug/net7.0/liblibdl.so: cannot open shared object file: No such file or directory
at Syncfusion.EJ2.PdfViewer.PdfiumNative.dlopen(String fileName, Int32 flags)
at Syncfusion.EJ2.PdfViewer.PdfiumNative.ExtractPdfiumLibrary()
at Syncfusion.EJ2.PdfViewer.PdfiumNative..cctor()
--- End of inner exception stack trace ---
at Syncfusion.EJ2.PdfViewer.PdfiumNative.FPDF_InitLibrary()
at Syncfusion.EJ2.PdfViewer.PdfiumViewer.FPDF_AddRef()
at Syncfusion.EJ2.PdfViewer.CacheManagement.GetDocument(MemoryStream stream, UInt32& error, Boolean IsIncrementLiveCount)
at Syncfusion.EJ2.PdfViewer.PdfRenderer.Load(Stream fileStream, Dictionary`2 jsonObject)
What distributions are supported for the pdfviewer, and what dependencies do I need to install?
/Simon