public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/classes/certificate.php
/**
		 * Renders the signature area for the certificate.
		 */
Renders the signature area for the certificate.
Renders the signature area for the certificate .
public function render_handleSignature() {
						$signature     = '';
			$signatureType = WPCW_arrays_getValue( $this->settingsList, 'cert_signature_type', 'text' );
			$signatureImg  = WPCW_arrays_getValue( $this->settingsList, 'cert_sig_image_url' );
			if ( 'text' == $signatureType ) {
				$encoding = WPCW_arrays_getValue( $this->settingsList, 'certificate_encoding', 'ISO-8859-1' );
				$signature = WPCW_arrays_getValue( $this->settingsList, 'cert_sig_text' );
				if ( ! $signature ) {
					return;
				}
				$signature_len = $this->pdffile->GetStringWidth( $signature );
				$this->pdffile->SetXY( $this->signature_X + ( ( $this->footer_line_length - $signature_len ) / 2 ), $this->footer_Y );
				$this->pdffile->Cell( 0, 0, $signature, false, false );
			} 
			else {
				if ( ! $signatureImg ) {
					return;
				}
				$sigWidth  = WPCW_Certificate::px2mm( WPCW_CERTIFICATE_SIGNATURE_WIDTH_PX );
				$sigHeight = WPCW_Certificate::px2mm( WPCW_CERTIFICATE_SIGNATURE_HEIGHT_PX );
				$signatureImg = $this->pdf_link_path( $signatureImg );
				$this->pdffile->Image( $signatureImg, $this->signature_X + ( $this->footer_line_length - $sigWidth ) / 2, $this->footer_Y - $sigHeight + 6, $sigWidth );
			}
		}
public function render_handleSignature ( ) { $ signature = '' ; $ signatureType = WPCW_arrays_getValue ( $ this -> settingsList , 'cert_signature_type' , 'text' ) ; $ signatureImg = WPCW_arrays_getValue ( $ this -> settingsList , 'cert_sig_image_url' ) ; if ( 'text' == $ signatureType ) { $ encoding = WPCW_arrays_getValue ( $ this -> settingsList , 'certificate_encoding' , 'ISO-8859-1' ) ; $ signature = WPCW_arrays_getValue ( $ this -> settingsList , 'cert_sig_text' ) ; if ( ! $ signature ) { return ; } $ signature_len = $ this -> pdffile -> GetStringWidth ( $ signature ) ; $ this -> pdffile -> SetXY ( $ this -> signature_X + ( ( $ this -> footer_line_length - $ signature_len ) / 2 ) , $ this -> footer_Y ) ; $ this -> pdffile -> Cell ( 0 , 0 , $ signature , false , false ) ; } else { if ( ! $ signatureImg ) { return ; } $ sigWidth = WPCW_Certificate :: px2mm ( WPCW_CERTIFICATE_SIGNATURE_WIDTH_PX ) ; $ sigHeight = WPCW_Certificate :: px2mm ( WPCW_CERTIFICATE_SIGNATURE_HEIGHT_PX ) ; $ signatureImg = $ this -> pdf_link_path ( $ signatureImg ) ; $ this -> pdffile -> Image ( $ signatureImg , $ this -> signature_X + ( $ this -> footer_line_length - $ sigWidth ) / 2 , $ this -> footer_Y - $ sigHeight + 6 , $ sigWidth ) ; } }
Renders the signature area for the certificate.
Renders the signature area for the certificate .
// Have we got a text or image signature?
 // Get the text for the signature // Use codepage translation of signature text //$signature = iconv('UTF-8', $encoding.'//TRANSLIT//IGNORE', WPCW_arrays_getValue($this->settingsList, 'cert_sig_text')); // Nothing to do, signature is empty // Create the signature // Image - see if we have anything to use. // No image to work with // Image is fetched using URL, and resized to match the space. We're using // an image that's twice the size to get it to scale nicely. // Make link relative. // Only force width