Signature

Home Forums How to Signature

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  admin 4 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19155 Reply

    webmaster12
    Participant

    For the current project I did core changes to the signature related code of FormidablePro. In detail: while FormidablePro generates the PNG (stored in /uploads/formidable/signatures/), I add a background image (by Imagick). So this works fine and my PNG-Signature files are stored in the named folder.

    Question1
    How do I tell your plugin to display the stored PNG-File in the PDF?

    Question2
    Where do I locate the code of your plugin which is plotting the signature data into the mapped textfield in the PDF? It seems that your plugin doesnt use the file “/formidablepro-2-pdf/signature-to-image.php” at all..

    #19210 Reply

    admin
    Keymaster

    We submitted an update on WordPress.org with new Filters: ‘fpro2pdf_signature’ and ‘fpro2pdf_sig_output_options’,

    The usage of sending prepared image:

      add_filter( 'fpro2pdf_signature', 'fpro2pdf_signature_func', 10, 3);
      function fpro2pdf_signature_func( $v, $field, $dataset ) {
         if ($field == 'nrtzvr')  {
             $uploads     = wp_upload_dir();
      $target_path = $uploads['basedir'] . '/';
      $target_path .= apply_filters( 'frm_sig_upload_folder', 'formidable/signatures' );
      $target_path = untrailingslashit( $target_path );
             $file = $target_path . '/'  . 'signature-1000-10.png';
            
            if (file_exists($file)) {
                $v = base64_encode(file_get_contents($file));
            }
         }  
       return $v;
     }

    The second shortcode which allow to replace just color and background of signatures:

    add_filter( 'fpro2pdf_sig_output_options', 'fpro2pdf_sig_output_options_func', 10, 2);
    function fpro2pdf_sig_output_options_func( $options, $field ) {
        if ($field == 'nrtzvr')  {
              $options['bgColour'] = array(0, 0, 0);
              $options['penColour'] = array(255, 255, 255);
        }
      return $options;
      }

    The filters will work on latest plugin version 2.88

    We remain at your service.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Signature
Your information: