Skip to content

Signature visual

A signature in a PDF can be invisible or visible. A visible signature has a visual: a graphic element with the signer’s name and personal identification number, OIB (for a seal: the seal name and the organisation’s OIB), the organisation name, the date and time, the verification code, a link and a QR code for verification, and up to three rows of your message. You enable the visual with the addVisualData field in PreSign (step 2 of the guide).

XML and JSON have no visible signature. With addVisualData true, the API writes the same data into the signature itself: in XML as a comment in the signature element, and in JSON as AKD’s hr block in the unsigned header etsiU.

The appearance of the visual is predefined: you cannot change its design, size or set of data. You choose the visual type, the page, the position and the messages. All fields are described in the PAdES API reference, and the images of the visual and of the locations are in Annexes A–C of the specification.

addVisualDataOptions.layoutId Size Contents
default (default) 248 × 122 pt standard set of data
small 248 × 61 pt (half height) smaller set of data, without the verification link, the verification code and the messages

With small, more visuals fit on a page and you can place the visual more precisely.

  • pageNumber – the page for the visual. 0 (default) is the last page; if it is full, the API tries the previous page. If no page has a free location, PreSign fails.
  • pageLocation – the location on the page. 0 (default) is the first free location. Locations are numbered left to right and top to bottom:
A4 page default small
portrait 1–12 (2 columns × 6 rows) 1–24 (2 × 12)
landscape 1–12 (3 columns × 4 rows) 1–27 (3 × 9)

If you set a location that is taken, PreSign fails with SIGNATURE_VISUAL_LOCATION_ON_PAGE_NOT_AVAILABLE.

The grid of locations is calculated from the page size. Annex A of the specification describes the calculation method for any page size; with it, you can show the user in advance where the visual will be placed.

The firstRowMessage, secondRowMessage and thirdRowMessage fields in documents[] add up to three rows of your message, each up to 60 characters. On a PDF, messages are shown only on the standard visual (default).

If the PDF has no electronic signatures yet, the API adds a blank A4 page (portrait) at the end of the document:

  • when you sign without a visual,
  • when you sign with a visual and pageNumber and pageLocation are 0.

This leaves room for the visuals of later signers.

The visual is created in PreSign. The signature is created only when the user enters the PIN, and it is embedded in PostSign. Therefore, the date and time on the visual usually do not match the time of the signature or of the time stamp exactly. This is in line with the standards for qualified electronic signatures. The platform sets the longest allowed gap between preparation and embedding.

Open the signed PDF in Adobe Acrobat Reader and display the Signature Panel. It shows the signer, whether the signature is valid and, for levels B-T, B-LT and B-LTA, the time stamp. If a visual was added, it is on the page and at the location set in PreSign. The signing time in Acrobat Reader can differ from the time on the visual (see Date and time on the visual). The specification (chapter 5.3.6) shows the check for all four levels.