In his walk through we will be referring to the following example, where the client service alias is PRT.505767457-PRT.111222333-e064c8c0-32ad-4dcf-9a76-f7542a5bae15 and the defined client service is test_123_Test_456_!!!
Steps:
generate the base64 of the string relative to <client service alias>:<client service password>. In our example it would be PRT.505767457-PRT.111222333-e064c8c0-32ad-4dcf-9a76-f7542a5bae15:test_123_Test_456_!!! (please note the colon sign “:”).
Example using https://www.base64encode.org/ will produce the encoded base64 credential string UFJULjUwNTc2NzQ1Ny1QUlQuMTExMjIyMzMzLWUwNjRjOGMwLTMyYWQtNGRjZi05YTc2LWY3NTQyYTViYWUxNTp0ZXN0XzEyM19UZXN0XzQ1Nl8hISE=
Authenticate your client service with the base64 credential string
This identification of the location where the visible signature will be applied can be set in one of the following ways:
SIGN_FIELD: Use a signature field present in the document. The signature field name should be set in the locationValue request attribute.
COORDINATE: Use a coordinate to find the correct document position. Supported format: page=<page_number>,x=<lower_left_x>,y=<lower_left_y>
PLACEHOLDER: Use a placeholder (unique word). System will scan the document for the given placeholder and stop in the first occurrence. The lower left part of the word will be used as a coordinate to start the drawing of the signature canvas from top/left orientation. If the placeholder is not found, an error will be thrown and the signature will not be applied. The placeholder value should be set in the locationValue request attribute.
Applying visible signature based on a signature field
Generate your PDF to be signed with a pre-configured signature field. The generation of such PDF is outside the scope of this tutorial, and should be investigated with your PDF generation software provider.
For this example we will use this example PDF which has a signature field with the name “Signature2” (see attachment Test_signature_field.pdf)
As with your typical signature, you’ll need to encode the pdf content in base64 format (see attachment Test_signature_field.b64).
Execute sign request on API using method /signstash/einvoice-integration-ws/api/v0/document/sign/base64/ (see attachment Test_signature_request.txt)
Signature response will present a document with the signature applied on the defined signature field (see attachment Test_signature_field_signed.pdf).
Attachments:
Applying visible signature based on a coordinate
Generate your PDF to be signed with a pre-defined area where the signature is to be applied . The generation of such PDF is outside the scope of this tutorial, and should be investigated with your PDF generation software provider.
For this example we will use this example PDF (see attachment Test_coordinate.pdf)
As with your typical signature, you’ll need to encode the pdf content in base64 format (see attachment Test_coordinate.b64).
Execute sign request on API using method /signstash/einvoice-integration-ws/api/v0/document/sign/base64/ (see attachment Test_signature_request.txt)
Signature response will present a document with the signature applied on the defined signature field (see attachment Test_coordinate_signed.pdf).