Mapping signature image to ACORD FORM

| By Webner

Mapping signature image to ACORD FORM

In most of the ACORD forms we’ve Authorized signature box in which we fill the name of some Authorized person and we can also map the signature image of the person along with the text name of the authorized person.

To map the image we first create a PDF of image and place the signature image at the required position (position depends upon the ACORD form) in the PDF. After converting the image to PDF we merge both the PDFs (Image PDF and already mapped ACORD FORM pdf) using PDFtk’s multistamp signal command and to resize and make some change in the signature image we need to use “Imagick” library that needs to be install in the system.

Steps to map an image signature to a ACORD FORM.

$mod_image = new Imagick($tmpName);
$mod_image->scaleImage(1800, 300, true);
$signature_image = $mod_image->getImageBlob();

$composite_image = new Imagick();
$composite_image->newImage(3000,300,new ImagickPixel('transparent'));

$pdf_image = new Imagick();   

// For ACORD 0025 2016-03 Acroform.pdf, this position can be different for each ACORD Form.
$signature_path = sys_get_temp_dir().'/signature_'.$unique.'.pdf';
$newpath = sys_get_temp_dir().'/signed_pdf.pdf';
$fullPath = sys_get_temp_dir()."/flattern_pdf.pdf";
$t= exec("pdftk ".$fullPath." multistamp ".$signature_path." output ".$newpath);

// $newpath variable holds the address of signed Flattern PDF.

Leave a Reply

Your email address will not be published. Required fields are marked *