TCPDF::setSignature( $signing_cert = '', $private_key = '', $private_key_password = '', $extracerts = '', $cert_type = 2, $info = array(), $approval = '' )
Enable document signature (requires the OpenSSL Library).
Description Description
The digital signature improve document authenticity and integrity and allows o enable extra features on Acrobat Reader. To create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt To export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12 To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes
Parameters Parameters
- $signing_cert
-
(Optional) (mixed) signing certificate (string or filename prefixed with 'file://')
Default value: ''
- $private_key
-
(Optional) (mixed) private key (string or filename prefixed with 'file://')
Default value: ''
- $private_key_password
-
(Optional) (string) password
Default value: ''
- $extracerts
-
(Optional) (string) specifies the name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used.
Default value: ''
- $cert_type
-
(Optional) (int) The access permissions granted for this document. Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature.
Default value: 2
- $info
-
(Optional) (array) array of option information: Name, Location, Reason, ContactInfo.
Default value: array()
- $approval
-
(Optional) (string) Enable approval signature eg. for PDF incremental update
Default value: ''
Source Source
File: includes/lib/tcpdf/tcpdf.php
Changelog Changelog
Version | Description |
---|---|
4.6.005 | Introduced. |