There are no libraries for pdflib via RPM so they need to be manually compiled so the PECL module can be compiled.
NOTE: This PECL module has only added support up to PHP 7. PHP 8 is not compatible and there is no maintainer to add support for PHP 8.
The following set of commands will get the pdflib libraries compiled and installed.
tar xvfz PDFlib-Lite-7.0.5p3.tar.gz
./configure && make && make install
Once that completes the pecl module needs to be installed manually using the command line so the correct path can be set like this for PHP 5.6 as an example
/opt/cpanel/ea-php56/root/usr/bin/pecl install pdflib
and when you see
path to pdflib installation? :
enter the following
and then press enter.
If this is a CloudLinux server with cagefs run
and then the final step restart the web server