BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
We have a requirement where we run our backends across both Windows and Linux. Our developers also use a mix of Windows and Linux.
We have a simple requirement: Convert PDF to images.
The code we have works in Windows world. However we are not able to build a cross platform solution that works for both Linux and Windows.
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Windows" Version="20.3.0.57"/>
We cannot swap this out for the Linux version as our .NET 7 backends require to run on both Windows and Linux. Is there any way that this can be done with Syncfusion?
Pdfium always causes issues with Syncfusion as it drives is crazy.
On Linux:
System.TypeInitializationException: The type initializer for 'Syncfusion.EJ2.PdfViewer.PdfiumNative' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'kernel32' 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:
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.3/kernel32.so: cannot open shared object file: No such file or directory
/home/dylan/Projects/Common/CommonServices/CommonService.Media.Test/bin/Debug/net7.0/kernel32.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.3/libkernel32.so: cannot open shared object file: No such file or directory
/home/dylan/Projects/Common/CommonServices/CommonService.Media.Test/bin/Debug/net7.0/libkernel32.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.3/kernel32: cannot open shared object file: No such file or directory
/home/dylan/Projects/Common/CommonServices/CommonService.Media.Test/bin/Debug/net7.0/kernel32: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.3/libkernel32: cannot open shared object file: No such file or directory
/home/dylan/Projects/Common/CommonServices/CommonService.Media.Test/bin/Debug/net7.0/libkernel32: cannot open shared object file: No such file or directory
Refer the below link for how Install EJ2 PDF Viewer packages automatically based on the operating system.
https://ej2.syncfusion.com/aspnetcore/documentation/pdfviewer/how-to/install-packages
Kindly check and lets us know if this is helpful.
I have read that link, thank you.
However we cannot do different builds per platform. That defeats the purpose of having a cross-platform app.
The requirement is the library is built once by using, and then at run time it must work across Linux and Windows.
We have created a separate ticket in your name for the last query. Kindly follow this ticket for further updates on this.