/
SignBuilder: Stamp Layout

SignBuilder: Stamp Layout

The stamp layout allows to define the position of the stamp on the signature page when one or several stamps are added.

Layout attributes

To insert the stamp in the document, you can specify the page, align and the size of the stamp with the following attributes

Atribute

Allowed values

Default

Description

Atribute

Allowed values

Default

Description

pageNumber

-1, 0, 1…N

null

The stamp will be applied in the page specified. -1 is Signature page
0 is Last page

positionOnPage

stamp

null

Use stamp value for signature with stamp

stampHeightPercentage

0 < x ≤ 1 U -1

0.25

The max percentage of the page (height) that the stamp could get.
If value is -1 the stampHeightPercentage will be ignored and stampWidthPercentage will be used instead.
Use stampHeightPercentage or stampWidthPercentage, but not both.

stampWidthPercentage

0 < x ≤ 1 U -1

-1 (ignored)

Similar to stampHeightPercentage but for the width of the page. If you want to use this attribute then the stampHeightPercentage must be -1. Do not use both attributes

stampAlign

start|center|end

center

Align the stamp in axis X (Similar to flex justify-content CSS)

stampAlignY

start|center|end

end

Align the stamp in axis Y (Similar to flex align-items CSS)

stampDirection

row|column

column

Use it when you want to add more than one stamp. This value will insert the stamp at the specified direction. (Similar to flex-direction CSS)

Page template

In the document, each page has margins and an area. The area will be used to insert the stamp.

The margins are 50 px for the x axis and 10 for the y axis, the rest of the area will be used to insert the stamp. Normally the size of a document is usually 595px by 892px, but this can be different

Attributes usage examples

stampHeightPercentage

The height percentage will expand or resize the stamp to the given percentage, for example if the height percentage is 50% then the stamp can take the half of the document. The following three examples are
stampHeightPercentage in 0.33, 0.5 and 1.

Note that the stamp always maintains the aspect ratio, so in the example of height percentage = 100% the stamp cannot increase any more because its width is the total width of the area.

 

stampWidthPercentage

Same as stampHeightPercentage but the limit of the area is in the x axis.

 

stampAlign

Align the stamp in the x axis

stampAlignY

Align the stamp in the y axis.

The stampAlignY value can be used in combination with the stampAlign value.

 

 

stampDirection

The stamp direction is used to insert more than one stamp. If a document has an stamp and stampDirection is specified, then the next stamp will be inserted next to the previous one if the stampDirection is “row” or will be inserted above the previous one if the value is “column”.

The stamps in the example above were inserted in numerical order specified in the image. If you want to insert 3 stamps, it is recommended that each stamp be 100%/{amountStamps} (33%) or 50% if you want to insert only two stamps. When you want to insert more than one stamp, it is recommended that you do not specify stampAlign and stampAlignY, because once the first stamp has been applied it cannot be moved and the next stamp may remain outside the document.

 

JSON example

“/signer/v2/sever/phase-one” [POST]

{ "file": { "fileId": null, "s3Id": { "bucket": "secure-doc-files-dev", "key": "{{file_s3_key}}" } }, "hashAlgorithm": "SHA256", "certificateChain": "{{certificate_chain}}", "reason": "I approve this document", "location": "Argentina", "image": { "file": { "fileId": null, "s3Id": { "bucket": "secure-doc-files-dev", "key": "{{file_stamp}}" } }, "onlyImage": false }, "position": { "pageNumber": -1, "positionOnPage": "stamp", "stampHeightPercentage": 0.33, "stampWidthPercentage": -1, "stampAlignY": "center", "stampDirection": "column" }, "addSignaturePage": true }

 

Related content

SignBuilder: Description
SignBuilder: Description
More like this
SignBuilder: API Rest
SignBuilder: API Rest
More like this
Signature Suite Products
Signature Suite Products
More like this
SignBuilder: Integration
SignBuilder: Integration
More like this
Usage and Integration
Usage and Integration
More like this
SignBuilder: Configuration
SignBuilder: Configuration
More like this