Member Junction
    Preparing search index...

    Interface SignatureFieldPlacement

    Where to place a single field for a signer on the document — the answer to "put the Sign Here box HERE, not at a hardcoded corner."

    Two placement strategies, checked in this order:

    1. Anchor string (anchor) — place the field wherever a marker string (e.g. "Signature:" or a hidden tag like "\\s1\\") appears in the document text. This is the portable, layout- resilient primitive supported by every provider (DocuSign anchor tabbing, Dropbox Sign / PandaDoc text tags). Preferred whenever the caller controls the document's content.
    2. Normalized coordinates (page + xPercent + yPercent) — an absolute fallback for when the document has no usable marker. Coordinates are percentages of the page (0–100), NOT raw pixels, so they're page-size independent; each driver converts to its native unit/origin.

    If a field supplies neither an anchor nor coordinates, the driver places no tab for it and lets the provider apply its own default. A recipient with an empty/absent fields array therefore produces no forced placement at all (the provider decides) — which is the correct behavior when the caller hasn't said where signing should happen.

    interface SignatureFieldPlacement {
        anchor?: string;
        anchorIgnoreIfNotPresent?: boolean;
        anchorUnits?: SignatureAnchorUnits;
        anchorXOffset?: number;
        anchorYOffset?: number;
        documentIndex?: number;
        page?: number;
        pageHeightPt?: number;
        pageWidthPt?: number;
        required?: boolean;
        type?: SignatureFieldType;
        xPercent?: number;
        yPercent?: number;
    }
    Index

    Properties

    anchor?: string

    Marker text in the document to anchor this field to (e.g. "Signature:").

    anchorIgnoreIfNotPresent?: boolean

    When true, don't error if the anchor string isn't found — just skip this field. Defaults to true.

    anchorUnits?: SignatureAnchorUnits

    Unit for the anchor offsets. Defaults to 'pixels'.

    anchorXOffset?: number

    Horizontal offset from the anchor, in anchorUnits.

    anchorYOffset?: number

    Vertical offset from the anchor, in anchorUnits.

    documentIndex?: number

    Which document (1-based index into the envelope's documents) this field targets. Defaults to all documents when omitted (a signature is typically wanted on every document).

    page?: number

    1-based page number to place the field on. Drivers adjust for 0-based APIs.

    pageHeightPt?: number
    pageWidthPt?: number

    The target page's true width/height in PDF points (1/72"), when known. A drag-and-drop placer that renders the actual document knows each page's real size, so it should pass these — they let each provider convert the xPercent/yPercent against the ACTUAL page rather than assuming US-Letter. Omit them only when the page size is genuinely unknown, in which case drivers fall back to a US-Letter assumption (correct for Letter docs, off for A4 / legal / landscape). Percentages stay page-size-independent; these just make the back-conversion exact for non-Letter pages.

    required?: boolean

    Whether the signer must complete this field. Defaults to true.

    What to place. Defaults to 'signature' when omitted.

    xPercent?: number

    X position as a percentage (0–100) of the page width.

    yPercent?: number

    Y position as a percentage (0–100) of the page height, measured from the top.