I want to use pdflib for php 8.2 in Alma 9 or Ubuntu 22.04. There is no pecl binary available. I downloaded php_pdflib.so and added it in php.ini. The required functions are available now. But PDF_new()
or pdf_new()
is not available. I tried to compile code from https://pecl.php.net/get/pdflib-4.1.4.tgz and https://github.com/Distrotech/PDFlib-Lite. But I faced the following error:
...
/var/tmp/pdflib/pdf.c:144:19: note: to match this _(_
144 | _pdf_exception(PDF_get_errnum(pdf), PDF_get_apiname(pdf), \
| ^
/var/tmp/pdflib/pdf.c:925:7: note: in expansion of macro _pdf_catch_
925 | } pdf_catch;
| ^~~~~~~~~
/var/tmp/pdflib/pdf.c: In function _zim_PDFlibException_get_errmsg_:
/var/tmp/pdflib/pdf.c:929:1: error: expected declaration or statement at end of input
929 | } /* }}} */
| ^
/var/tmp/pdflib/pdf.c: In function _zim_PDFlibException_get_apiname_:
/var/tmp/pdflib/pdf.c:929:1: error: expected declaration or statement at end of input
make: *** [Makefile:210: pdf.lo] Error 1
ERROR: `make' failed
I know I can use other library but huge code is written in pdflib and those codes are running in php 5.4. I need to upgrade php. I followed this but same error.
Any help will be appreciated.