Introduction
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.
Procedure
The following set of commands will get the pdflib libraries compiled and installed.
cd /usr/local/src
wget https://fossies.org/linux/misc/old/PDFlib-Lite-7.0.5p3.tar.gz
tar xvfz PDFlib-Lite-7.0.5p3.tar.gz
cd PDFlib-Lite-7.0.5p3/
./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
/usr/local/
and then press enter.
If this is a CloudLinux server with cagefs run
cagefsctl --force-update
and then the final step restart the web server
/scripts/restartsrv_httpd --hard