Before you begin
- The document is a PDF with a text layer. Anchors are found in the document’s text. A scan with no text layer has nothing to match.
How anchors work
You give each anchor anid of your choosing, the text to look for, and an offset that says where the field goes relative to that text. Circularo searches the document and returns the calculated position for every place the text was found.
The search runs line by line. Use text for an exact phrase, letter case included, or regexp for a pattern, which ignores letter case for the unaccented letters A to Z only. The offset is measured from the top-left corner of the first character of the match, and — like every position in the API — its values are fractions of the page:
An offset of
0 on both axes puts the field directly on top of the anchor text, which is rarely what you want — shift it above, below or beside the phrase.
Step 1: Upload the document with anchors
The agreement ends with two lines,Employee signature: and Employer signature:. Anchor a field above each of them:
Request
Response
id you gave it — with one entry in matches per place the text was found. Here that is one each, both on page 1. The two positions share the same y and differ in x, exactly like the two signature lines on the page.
An anchor whose text is nowhere in the document is not an error: it comes back with an empty
matches list. Check for that before you build the transaction — it means the document does not look the way you expected, and no field would be placed.Step 2: Place a field on each calculated position
Amatches entry’s position has exactly the shape a placed field expects, so it goes into signatureFields as it is:
Request
Response
Complete example
Uploading with anchors and sending the agreement, as a Node.js script. Error handling is minimal for brevity — in production, inspect the error envelope of non-2xx responses.Next steps
- Work with fixed coordinates and the other field kinds — Place fields on the document.
- Deliver the signing link yourself instead of relying on email — Hand out signing links yourself.