signPDF

sign (for PDF files)

PREMIUM BASIC / ADVANCED

Digitally signs a PDF document.

Description
public sign (string $target, [array $optionsSignature, array $optionsImage])

This method allows you to digitally sign a PDF document.

Parameters

target

Path to save the PDF output.

optionsSignature

The possible keys and values are:

key Type Description
x float Abscissa of the upper-left corner. 180 as default.
y float Ordinate of the upper-left corner. 60 as default
w float Width of the signature area. 15 as default.
h float Height of the signature area. 15 as default
page int Page number (if < 0 the last page is used). -1 as default
accessPermission int Access permissions granted for this document. 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;; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification. 2 as default.

optionsImage

The possible keys and values are:

key Type Description
src string Image file path.
x float Abscissa of the upper-left corner (LTR) or upper-right corner (RTL). 180 as default.
y float Ordinate of the upper-left corner (LTR) or upper-right corner (RTL). 60 as default.
w float Width of the image in the page. If not set, it's automatically calculated. 15 as default.
h float Height of the image in the page. If not set, it's automatically calculated. 15 as default.
link string URL. Empty as default.
Return values

Void.

Code samples

Example #1

The resulting Word document looks like: