To work with the PDF custom report item on the Linux machine , the libdl.so
library must be available in the machine to enable access to the PdfiumNative assembly.
When running the PDF custom report item on Linux machine, you will get the
TypeInitializationException: Type initializer for "Syncfusion.PdfToImageConverter.PdfiumNative" threw an exception
.
Steps to create the libdl.so library:
Locate the libdl.so
library by executing the following command:-
sudo find /usr -name 'libdl.so*'
If the libdl.so
library is found, skip the following steps. If it is not found switch to the third step.
If the libdl.so
library is found in different versions such as libdl.so.2, create a symbolic link named libdl.so
in the located directory by executing the following command:-
sudo ln -s /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so
Verify that the symbolic link
was created successfully by executing the following command, the output will be /usr/lib/x86_64-linux-gnu/libdl.so -> /usr/lib/x86_64-linux-gnu/libdl.so.2
.
ls -l /usr/lib/x86_64-linux-gnu/libdl.so
Note: If the libdl.so.2 is found in multiple locations, create the symbolic link in the
/usr/lib/x86_64-linux-gnu
directory. If it is not found there, create in/usr/lib64
directory. Otherwise, create the symbolic link in the directory where the libdl.so.2 library is located. If libdl.so.2 is not found, check for libdl.so.2.1 or any other available version.