Add Digital Signature to Pdf

This area is devoted to Magento Form Builder SmartFormer Gold. Please ask questions, report bugs and share ideas here.

Add Digital Signature to Pdf

Postby jtankersley » Wed Oct 15, 2014 5:02 pm

Hello,
I am using smart former gold with the digital signature plugin and advanced pdf plugin. I am trying to get the Digital Signature file to render in the PDF when it is generated. Can you explain how to do this?

Thanks!
jtankersley
 
Posts: 2
Joined: Wed Oct 15, 2014 4:57 pm

Re: Add Digital Signature to Pdf

Postby IToris team » Wed Oct 15, 2014 8:50 pm

Hi jtankersley,

That can be done in 2 steps:
1) Open Tools -> PHP Editor in menu. BETWEEN lines $form->getPostedValues(); and $form->doAfterSubmitAction(); add:
Code: Select all
if (isset($form->files['signature'])) {
   if (file_exists($form->files['signature']['tmp_name'])) {
      @copy($form->files['signature']['tmp_name'], Mage::getBaseDir().'/media/tmp/__'.$form->files['signature']['name']);
      $form->data['signature_url'] = Mage::getBaseDir().'/media/tmp/__'.$form->files['signature']['name'];
      $_SESSION["sfg"][$form->form_id]["data"]["signature_url"] = $form->data['signature_url'];
   }
}

Save the code and save the entire form.

2) In PDF template insert image (click "Insert/Edit Image" button in WYSIWYG). In SRC of the image (image URL) write: {signature_url}
In HTML source it should look like: <p><img src="{signature_url}" alt="signature" /></p>

Regards,
ITORIS team
IToris team
Site Admin
 
Posts: 1685
Joined: Mon Jan 19, 2009 12:33 pm

Re: Add Digital Signature to Pdf

Postby jtankersley » Wed Oct 15, 2014 9:06 pm

perfect!!! Thanks!
jtankersley
 
Posts: 2
Joined: Wed Oct 15, 2014 4:57 pm


Return to SmartFormer Gold for Magento

Who is online

Users browsing this forum: No registered users and 1 guest

cron