I want to add digital signature into pdf document, with help of php. I have the .pfx digital signature format with me.

I searched in google, all the results are pointing to TCPDF, I tried with using this library, but it has some issues to sign the pdf.

If you don't share the issues or report a bug to the keepers of TCPDF they won't respoind or fix it. Not to leave you without recourse I am running into folk that don't understand how things work. That is, if you find a bug, you have to report the bug. If you don't then you accept that the bug is OK.