phpdigital-signaturetcpdffpdi

How to add digital signature in a pdf having a digital sign on it already with tcpdf in php


I am using the tcpdf and fpdi to import and sign the pdf, but when i try to add the second digital signature the first one does not retain. It might creating the new pdf.

So, is there any way to retain or at least reinsert the old signature to to the pdf.


Solution

  • There is no direct way to do this,

    So what i did is,

    I used Jsignpdf which is in java and support such functionality and has cli support.

    So i made a cli call to Jsignpdf's cli using php exec function.

    for jsignpdf check this link