Skip to navigation

Fixed positioning

View as Markdown

Fixed positioning

Fixed positioning (also known as absolute positioning) places a tab at a fixed location using the xPosition and yPosition tab properties, measured in units of points. A point is 1/72nd inch (or 3.527 points per millimeter). This method works well for static documents or documents that don’t change much over time.

In most cases, the upper left corner of the tab will be placed at a position a number of points equal to xPosition from the left side of the document and a number of points equal to yPosition from the top of the document.

For example, if you want to place a signature tab in a specific location that does not change based on the position of related text, you can use the code below. It places the tab 100 points to the right of the document’s left edge and 200 points below the document’s top edge. :

"tabs": {
"signHereTabs": [
{
"xPosition": "100",
"yPosition": "200",
"name": "signHere",
"documentId": "1",
"pageNumber": "1"
}
]
}

Note: How to set tab values in a template provides a walkthrough and sample code for fixed positioning.

Calculating tab position

  1. Decide where you want to put the tab on your page. The x and y coordinates you choose for the tab specify where the upper left point of the tab will be placed. This will be considered Point A. Any decimal measurements will be rounded to the nearest 72nd of an inch.

  2. Calculate the xPosition and yPosition of Point A. To calculate your xPosition and yPosition, you should:

    1. Determine how many inches from the left side of the page Point A is. We will call this number DistanceX.

      The xPosition for Point A will be:

      xPosition (points) = 72 (DPI) * DistanceX (inches)

      Alternatively, for millimeters: xPosition (points) = DistanceX (millimeters) / 3.527 (millimeters per dot)

    2. Determine how many inches from the top of the page Point A is. We will call this number DistanceY.

      The yPosition for Point A will be:

      yPosition (points) = 72 (DPI) * DistanceY (inches)

      Alternatively, for millimeters: yPosition (points) = DistanceY (millimeters) / 3.527 (millimeters per dot)

      Round the xPosition and yPosition values to the nearest whole integer.

      co-ordinates origin

    3. Determine the offset that you want for your tab. Due to requirements for supporting legacy functionality and to avoid breaking any existing integrations, some tabs can have different behavior when placed with fixed positioning. See each tab’s individual documentation in the API reference for details.

      Once you’ve found the offset you want, apply it to your tab’s xPosition and yPosition values. These values must be integers.

  3. Now that you have calculated the xPosition and yPosition of the point where you need to add your tab, you can add it to the document via an API call or using one of the eSignature SDKs. For details, see one of the code examples that demonstrate adding tabs to a document, such as How to request a signature by email.

    Note: In v2.1 of the eSignature API, you cannot specify a negative xPosition or yPosition or an exception will be generated.

  4. After adding the tab to your document, verify that the tab was placed in the correct spot on the final completed PDF. To view the tab in its document, send the envelope to yourself, sign or complete it (if applicable), and then view the completed envelope in your inbox.

    Note: The completed document holds the absolute position of all added tabs. Any other representation of the document in a web or mobile UI is an approximation of how the tabs will appear within the completed document.

    On the Envelope Summary page, on the right side above Signing Order, you will be able to download the relevant document as a PDF. The tab you placed will be saved directly into the page.

    envelope summary

Next steps

See How to set tab values in a template for an example of how to add tabs to a document via fixed positioning.