Table of contents
Namespace: Com\Tecnick\Pdf\Signature
Final: Yes
File: External.php line 40
Fluent sub-facade for the external / remote signing workflow, reached through Tcpdf::signature()->external(). It forwards to the existing external-signing methods on Tcpdf.
Tags
- phpstan-import-type: TSignature from \Com\Tecnick\Pdf\Base
- since: 2002-08-03
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2002-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf
Methods
__construct()
File: External.php line 42
public __construct(Tcpdf $pdf) : mixed
Parameters
- $pdf : Tcpdf
apply()
File: External.php line 93
public apply(string $preparedPdf, array{int, int, int, int} $byteRange, string $signature[, string|ExternalSignatureEncoding $encoding = 'binary' ]) : string
Parameters
- $preparedPdf : string: Prepared PDF returned by prepare().
- $byteRange : array{int, int, int, int}: ByteRange returned by prepare().
- $signature : string: External signature data.
- $encoding : string|ExternalSignatureEncoding = ‘binary’: Signature encoding: binary, base64, hex, or enum case.
Tags
- throws: Exception
Return values
string —
Fully signed PDF document.
configure()
File: External.php line 53
public configure(TSignature $data) : self
Parameters
- $data : TSignature: Signature configuration (signcert/privkey may be empty).
Tags
- throws: Exception
Return values
self
prepare()
File: External.php line 76
public prepare([string $algorithm = 'sha256' ]) : array{algorithm: string, byte_range: array{int, int, int, int}, prepared_pdf: string, hash_raw: string, hash_hex: string, hash_base64: string}
Parameters
- $algorithm : string = ‘sha256’: Hash algorithm accepted by hash() (default: sha256).
Tags
- throws: Exception
- throws: Throwable
Return values
array{algorithm: string, byte_range: array{int, int, int, int}, prepared_pdf: string, hash_raw: string, hash_hex: string, hash_base64: string}