Appearance

Fluent sub-facade for the signature widget appearance, reached through Tcpdf::signature()->appearance().

Namespace: Com\Tecnick\Pdf\Signature

final class Appearance

Source: src/Signature/Appearance.php:38

Fluent sub-facade for the signature widget appearance, reached through Tcpdf::signature()->appearance(). It forwards to the existing appearance methods on Tcpdf while returning $this for chaining.

Methods

__construct()

public __construct(Tcpdf $pdf)

Parameters:

Source: src/Signature/Appearance.php:40

description()

Set the description of the signature field, used as the /TU and /Contents entries of the widget annotation in a tagged mode.

public description(string $description): self

Parameters:

  • $description (string): Human readable description of the signature field.

Returns: self

Source: src/Signature/Appearance.php:74

place()

Place the visible signature appearance rectangle.

public place(
    float $posx = 0,
    float $posy = 0,
    float $width = 0,
    float $height = 0,
    int $page = -1,
    string $name = ''
): self

Parameters:

  • $posx (float): Abscissa of the upper-left corner.
  • $posy (float): Ordinate of the upper-left corner.
  • $width (float): Width of the signature area.
  • $height (float): Height of the signature area.
  • $page (int): Page number (if < 0 the current page is used).
  • $name (string): Name of the signature field.

Returns: self

Throws:

Source: src/Signature/Appearance.php:56

stream()

Set a custom appearance stream for the signature widget annotation.

public stream(
    string $stream,
    string|SignatureAppearanceMode $mode = 'N',
    string $state = ''
): self

Parameters:

  • $stream (string): Appearance stream content.
  • $mode (string|SignatureAppearanceMode): Appearance mode: N (normal), R (rollover), D (down), or enum case.
  • $state (string): Optional appearance state name.

Returns: self

Throws:

Source: src/Signature/Appearance.php:89

xobject()

Use a Form XObject as the signature widget appearance source.

public xobject(string $xobjid): self

Parameters:

  • $xobjid (string): XObject resource name (for example “IMP1”).

Returns: self

Throws:

Source: src/Signature/Appearance.php:102