php实现电子签名,php实现往pdf中加数字签名操作示例【附源码下载】

本文展示了如何使用PHP的TCPDF库为PDF文件添加数字签名的详细步骤,包括所需证书文件设置、信息定义及签名外观创建。提供源码下载供参考。
摘要由CSDN通过智能技术生成

本文实例讲述了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, '&#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值