Widget

Emits a signature field's widget annotation (/Subtype /Widget, /FT /Sig). The same shape serves the signed field (with a /V reference to the /Sig value object) and the reserved empty approval fields (no /V). The rectangle, the page object number, and any appearance fragment are computed by the host, which knows the page geometry and appearance resources.

Table of contents

Namespace: Com\Tecnick\Pdf\Sign\Output

Final: Yes

File: Widget.php line 40

Emits a signature field’s widget annotation (/Subtype /Widget, /FT /Sig). The same shape serves the signed field (with a /V reference to the /Sig value object) and the reserved empty approval fields (no /V). The rectangle, the page object number, and any appearance fragment are computed by the host, which knows the page geometry and appearance resources.

Tags

Methods

annotation()

File: Widget.php line 58

public annotation(int $objectId, string $rect, int $pageObjectId, string $fieldName[, int|null $valueObjectId = null ][, string $appearance = '' ][, callable|null $stringEncoder = null ]) : string

Parameters

  • $objectId : int: Annotation object number.
  • $rect : string: Rectangle coordinates “x0 y0 x1 y1”.
  • $pageObjectId : int: Object number of the page the widget is on (/P).
  • $fieldName : string: Partial field name (/T).
  • $valueObjectId : int|null = null: /V value object number; null for an unsigned field.
  • $appearance : string = ‘’: Optional pre-built appearance fragment (e.g. " /AS /N /AP « … »"), written into the dictionary as given, as the /Reference and /M fragments Signature takes are.
  • $stringEncoder : callable|null = null: fn(string $text, int $objectId): string.

Tags

  • throws: Exception If the rectangle, an object number, or the field name is malformed, or the string encoder returns a non-string value.

Return values

string