Anchors in Google Docs

Write [[ls:signature:Client]] in a Google Doc, import it as a template, and the signature, date and text fields are already in place.

Templates → New → Google Drive (the button beside Choose a file) turns a Google Doc into a template. Choose Fixed document (PDF) and every anchor you wrote in the doc becomes a field, placed where the anchor stands. No dragging boxes.

Write the anchors

An anchor is a short tag in square brackets, typed straight into the doc:

[[ls:KIND:ROLE]]
[[ls:text:ROLE:FIELD_KEY]]

KIND       signature | initial | date | name | text | checkbox
ROLE       who fills it in: Client, Landlord, Tenant, s1, s2 …
FIELD_KEY  text only, optional: a name for the box, e.g. company.legal_name

A signature block for two parties:

Zürich, [[ls:date:Client]]                Zürich, [[ls:date:Agency]]

[[ls:signature:Client]]                   [[ls:signature:Agency]]
______________________                    ______________________
[[ls:name:Client]]                        [[ls:name:Agency]]
AnchorBecomes
[[ls:signature:Client]]A signature box for the client
[[ls:initial:Client]]An initials box
[[ls:date:Client]]The date the client signs, stamped at signing
[[ls:name:Client]]A text box that opens with the client's name
[[ls:text:Client:company.legal_name]]A text box keyed company.legal_name
[[ls:checkbox:Client]]A box the client can tick; optional unless you switch Required on

Roles become signers

Each role is one signer of the template, in the order the doc first names it: in the example above Client is signer 1 and Agency signer 2, and the template's signers are named after them. s1, s2 … keep their number. You pick the real people when you send.

Rules that keep it working

  • One line. An anchor must sit on one line of text. One that wraps is left as plain text.
  • Once per page per role for signature, initial, date and name. If the same anchor appears twice on one page, the doc is imported without fields and you place them by hand (the import tells you). text and checkbox may repeat.
  • Spelling. Letters, digits, _ and - in the role; no spaces. Upper or lower case does not matter.
  • Size. Write the anchor in the doc's normal font size. A signature box is about 7 cm wide and is centred on the anchor, so leave room around it.

What happens to the anchor

Google exports the doc as a PDF with its exact layout. We find each anchor in the text, put the field there and cover the anchor with white, so your signers see a clean page with their field on it.

If the doc has no anchors, or its PDF has no readable text, the import says so and you place the fields by hand.

Fields placed from anchors can be moved, resized or deleted in the editor like any other field, and you can add more by hand.

Editable template imports the same doc into the writing editor instead. Its layout is simplified (columns, complex tables and page headers), and the anchors stay as text. Choose it when you want to rewrite the contract in wesign.now; choose Fixed document (PDF) when the doc is final and the layout matters.

Where the template remembers its source

A template made from a Google Doc shows From Google Docs: (title), as of (date) on its page, with a link to the doc for your workspace's members. The template keeps the version you imported; later edits in Google Docs do not change it.

Access

The import asks Google for access to the one file you pick, nothing else in your Drive (drive.file). The access is used once for the import and not stored.

The same anchor syntax places fields on PDFs sent through the API: see Anchor placeholders.