本文实例讲述了php实现往pdf中加数字签名操作。分享给大家供大家参考,具体如下:
//============================================================+
// file name : example_052.php
// begin : 2009-05-07
// last update : 2013-05-14
//
// description : example 052 for tcpdf class
// certification signature (experimental)
//
// author: nicola asuni
//
// (c) copyright:
// nicola asuni
// tecnick.com ltd
// www.tecnick.com
// info@tecnick.com
//============================================================+
/**
* creates an example pdf test document using tcpdf
* @package com.tecnick.tcpdf
* @abstract tcpdf - example: certification signature (experimental)
* @author nicola asuni
* @since 2009-05-07
*/
// include the main tcpdf library (search for installation path).
require_once('tcpdf_include.php');
// create new pdf document
$pdf = new tcpdf(pdf_page_orientation, pdf_unit, pdf_page_format, true, 'utf-8', false);
// set document information
$pdf->setcreator(pdf_creator);
$pdf->setauthor('nicola asuni');
$pdf->settitle('tcpdf example 052');
$pdf->setsubject('tcpdf tutorial');
$pdf->setkeywords('tcpdf, pdf, example, test, guide');
// set default header data
$pdf->setheaderdata(pdf_header_logo, pdf_header_logo_width, pdf_header_title.' 052', pdf_header_string);
// set header and footer fonts
$pdf->setheaderfont(array(pdf_font_name_main, '', pdf_font_size_main));
$pdf->setfooterfont(array(pdf_font_name_data, '&#