NextGen XML

The NextGen XML allows to create a signature process with defined signature position. The XML is a container which contains the PDF document as base64 stream, the information of the signature positions and configuration values. After signing you can collect the Return-XML which contains the signed document and additional information of the signatures.

 

Signature fields Definition

There are 3 ways to find the signature positions inside the document.

  • static coordinates (<Static/>), which means you define the postion within centimeters inside a page. If documents are static you can very easy place your signatures.

  • intelligent search (<Signature>), is recommend if your documents are dynamic and the signature postion is changing depending of the content. For the placement we using the text search function, to place the signature next to a search text which is near the siganture. This allows the usage of dynamic documents, important is only that the signature placement to the search text stays the same and the search text can be found. If a search text is not found the signature will be ignored, this means you can create a template xml for different document layout, you only need to be sure that the search text is specific enough that it will not be found at postions you do not want. You can also hide the search texts by using white text colour on white background.

  • using existing signature fields <DigSig/>. In case the document already has empty signature fields you can also use them.

XML Tags

The XML documentation is always based on the latest firmware. In case you have problems with specific XML Tags, please run a firmware update to check if that solves the issue.

Name

Required

Description

Name

Required

Description

<PDF>

Yes

The document as base64 stream

<Signatures>

Yes

Unites the section, that defines signature fields, offered to user, when he enters signing mode.

Fields, defined in XML document are handled the same way as intelligent signature fields contained in SSS files.

<Signature>

 

 

 

 

At least one of the tags <Signature>, <Static> or <DigSig> is required to define the signature positions. A combination of different signature placement is possible.

Each signature is a separate tag. The number of signature fields are not limited

Nested tags of <Signature> are defined below.

<Static>

Declares a static field, as alternative to intelligent fields declared with <Signature>.

Static field properties must be defined by child tags. Possible child tags are <Page>,<X>,<Y>. The <Page> tag allows you to set also negative values (-1 for last page, -2 the page before the last page; etc...). If the <Page> tag is set to 0, the signature field will be ignored.

<Static> <Page>1</Page> <X>3.5</X> <Y>21.5</Y> <Height>3.1</Height> <Width>5</Width> </Static>

<DigSig>

Declares an empty signature field, which is already inside the PDF document. It's an alternative to static and intelligent fields.

<FieldName>

Yes as part of <DigSig>

Contains the name of the Signature field, which is already inside the PDF.

<Placeholder>

Yes, as part of <Signature>

Contains anchor substring, that is used to find signature fields.

<Width> and <Height>

Yes, as part of <Static> and <Signature>

Defines signature field sizes in centimeters.

<DisplacementTLIndex> or <VersatzOLIndex>

Optional as part of <Signature>

Defines the position of the anchor point inside rectangle, surrounding the key string. Can be represented visually as 3x3 matrix:

1   2   3

4   5   6

7   8   9

More information can be found here.

<FeldPositionIndex>

Optional as part of <Signature>

Defines the position of the field relatively to the key string based on a 3x3 matrix simelar to DisplacementTLIndex, just mirrored.

9   8   7

6   5   4

3   2  1

More information can be found here.

<Offset_X> and <Offset_Y>

Optional as part of <Signature>

Are optinal tags. By specifying non-zero values, it's possible to move the signature field by the given number of centimetres.

Positive values move the field to the right / bottom, negative values to the left / top.

More information can be found here.

<Mandatory/>

Optional

Is an optional field indicating that signature field is mandatory.

Please note: webSignatureOffice expects a value for this tag: <Mandatory>1</Mandatory> means mandatory field, <Mandatory>0</Mandatory> means optional field

<Zoom> 

Optional

Is an optional tag, that defines zoom values for the document in eSignatureOffice/webSign/secureSign for a particular signature field.

Text inside the tag can be either an integer value in range 10..300 (denotes percent)

or Fit, that means fit to Screen

or Width, that means fit to page width.

The default zoom value is 100 percent.

<SignatureDisplayPlacement>

Example:

<SignatureDisplayPlacement>

<MaxWidth>40</MaxWidth>

<MaxHeight>20</MaxHeight>

<RectPosX>10</RectPosX>

<RectPosY>80</RectPosY>

</SignatureDisplayPlacement>

Optional as part of <Signature> or under <ESign> as global option for every signature without the individual option

Optional tags, that are defining the position and sizing of the signature field (rectangle) on the device display.

<RectPosX> and <RectPosY> is for placing the signature. You can use only one of the values or combine both of them. The default value is 50 % which is the center of the screen.

(0, 0) is upper left corner and (100, 100) is bottom-right corner.

RectPos-0and0.png
RectPos-100and100.png

<MaxWidth> and <MaxHeight> is for sizing of the signature based. You can use only one of the values or combine both of them. In case you using both values, the device will zoom until the first of the two values is reached. When using this values the Zoom Values will become obsolete.

The value range is between 10 and 100 percent.

<Stamp>

 

Example:

<Stamp>

<Position>BottomLeft</Position>

<Text>Unterzeichnet von:  [Signer]\r\n
              Grund:  [Reason]\r\n
              Ort:    [Location]\r\n
              Zeit:   [Time]
</Text>

<Size>12</Size>

<Color>0x0000FF</Color>
</Stamp>
<Signer>Homer Simson</Signer>
<Reason>Bestätige den Inhalt</Reason>
<Location>Springfield</Location>

Optional

Is an optional tag. Specifies signature stamp (text), that is stored together with signature image on document page.

<Text> Tag should contain stamp text. New line can be entered with \r\n symbols.

<Color> Defines text Color. In hexadecimal format, it represents RGB color intensities for blue, green, and red.

The value 0x00FF0000 represents full-intensity, pure blue, 0x0000FF is pure green, and 0xFF0000 is pure red. 0x000000 is black and 0xFFFFFF is white.

<Font> and <Size> Defines font face and size respectively.

<Posistion> defines the position of the stamp on signature image. default is BottomLeft.

hier are all posible values:

  • <Position>BottomLeft</Position>

    <Position>TopLeft</Position>

    <Position>TopRight</Position>

    <Position>BottomRight</Position>

    <Position>CenterLeft</Position>

    <Position>CenterRight</Position>

    <Position>Center</Position>

Information about the stamp placeholder can be find here

<Signer>, <Reason> and <Location>

Optional

Tags can be used to specify signer name, reason for signing and signing location respectively.

<AutoStartSig>

Optional

If this tag is included, the device starts signing automatically after document is opened.

<Signed>

Return Value

This tag is added into the result xml, to indicate if the signature was added or skipped. By <Placeholder> signatures the values is 1 (for signed) when at least one of the found postion was signed. For individual signature details the <SignedProtocol> will be added.

Values:

0 = not signed

1 = signature was signed

<SignedProtocol>*
<Index id="1">0</Index>
<Index id="2">1</Index>
...
</SignedProtocol>

Return Value

This tag is added to the result xml for each <Placeholder> signature which was found inside the document. There is a separate index for each placeholder position which was found inside the pdf.

Values:

0 = not signed

1 = signature was signed

<Found>

Return Value

This tag is added into the result xml, to indicate if the signature position (<FieldName> and <Placeholder>) where found.

Values:

0 = not found in the document

1 = found inside the document

*this XML Tags are not implemented/published yet and will be added in the future.

XSD Sets

Samples for the Signature Placements

<Signatures> <Static> <Page>1</Page> <X>3.5</X> <Y>21.5</Y> <Height>3.1</Height> <Width>5</Width> <Signed>0</Signed> <Found>0</Found> ... </Static> ... </Signatures>
<Signatures> <Signature> <Placeholder>Signature Customer</Placeholder> <Width>4</Width> <Height>3</Height> <DisplacementTLIndex>7</DisplacementTLIndex> <FeldPositionIndex>3</FeldPositionIndex> <Offset_X>0</Offset_X> <Offset_Y>-3</Offset_Y> <Signed>0</Signed> <Found>0</Found> ... </Signature> ... </Signatures>

 

Sample XML-Files

Static coordinates:

Placeholder search:

existing Signaturefields: