php - TCPDF digital signature not visible in adobe viewer -


i trying add digital signature existing pdf file using fpdi , tcpdf, signature getting added pdf file in adobe viewer signature not visible, small rectangular block visible in pdf not text in (i.e. signed john doe, date: ............)

below code,

<?php  require_once('./tcpdf/tcpdf.php'); require_once('./tcpdf/tcpdf_import.php'); require_once('./fpdi/fpdi.php');   $pdf   = new fpdi('l', 'mm', 'letter'); //fpdi extends tcpdf $pdf->addpage(); $pages = $pdf->setsourcefile('pan.pdf'); $page  = $pdf->importpage(1); $pdf->usetemplate($page, 0, 0);  $certificate = 'file://g:/wamp/www/cert/certificate.crt';  $info = array(     'name'        => 'nishant',     'location'    => 'ahmedabad',     'reason'      => 'testing signature',     'contactinfo' => 'http://www.google.com', );   $pdf->text(200, 170, 'test content'); $pdf->setsignature($certificate, $certificate, 'nishant', '', 2, $info); $pdf->setsignatureappearance(200, 170, 40, 20);  $pdf->output('signed.pdf', 'd'); 

attached screenshot of pdf in adobe viewer enter image description here

also per sample given on adobe website; https://blogs.adobe.com/security/samplesignedpdfdocument.pdf

a digital signature looks below screenshot

enter image description here

if can me out, appriciated

please note

  • i using self signed certificate, generated using openssl
  • i have checked "view signed version" option in adobe viewer
  • i looking opensource answer of digitally signing pdfs

thanks


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -