How to allow signers to print and sign the document using BoldSign API?
BoldSign supports signers to allow printing and signing the document. This article will guide you on how to enable signers to print and sign the document using the API.
You can allow signers to print and sign the document by setting EnablePrintAndSign
to true when sending the document via API.
Below are a few code examples demonstrating how to allow signers to print and sign the document.
Code snippet
curl -X 'POST' \ 'https://api.boldsign.com/v1/document/send' \ -H 'accept: application/json' \ -H 'X-API-KEY: {your API key}' \ -H 'Content-Type: multipart/form-data' \ -F 'Signers={ "name": "David", "emailAddress": "david@cubeflakes.com", "formFields": [ { "id": "string", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 100, "y": 100, "width": 100, "height": 20 }, "isRequired": true } ], "locale": "EN" }' \ -F 'EnablePrintAndSign=true' \ 'Files={your file}' \ -F 'Title=Print and Sign' \
import requests import json url = "https://api.boldsign.com/v1/document/send" signer_data = { "name": "David", "emailAddress": "david@cubeflakes.com", "signerType": "Signer", "signerRole": "Signer", "formFields": [ { "id": "Signature", "type": "FieldType.Signature", "pageNumber": 1, "bounds": { "x": 100, "y": 100, "width": 200, "height": 100 }, "isRequired": True, } ], "locale": "EN" } headers = { 'accept': 'application/json', 'X-API-KEY': '{your API key}' } payload = { 'Signers': json.dumps(signer_data), 'Title': "Sample Document", 'EnablePrintAndSign':True, } files = [ ('Files', ('{Your file name}', open('{Your file path}', 'rb'), 'application/pdf')) ] response = requests.post(url, headers=headers, data=payload, files=files) print(response.text)
const axios = require('axios'); async function GetData(){ try{ const FormData = require('form-data'); const fs = require('fs'); data.append('Files', fs.createReadStream('{Your file path}')); data.append('Signers', '{\r\n "name": "David", \r\n "emailAddress": "david@cubeflakes.com",\r\n "signerType": "Signer",\r\n "formFields": [\r\n {\r\n "id": "Signature",\r\n "Type": "FieldType.Signature", \r\n "pageNumber": 1,\r\n "bounds": {\r\n "x": 100,\r\n "y": 100,\r\n "width": 200,\r\n "height": 200\r\n }, \r\n "isRequired": true\r\n}\r\n ],\r\n "locale": "EN"\r\n}'); data.append('EnablePrintAndSign',"true"); data.append('Title', "Sample Document"); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://api.boldsign.com/v1/document/send', headers: { 'accept': 'application/json', 'X-API-KEY': '{Your API Key}', ...data.getHeaders() }, data : data }; const response = await axios.request(config); console.log(JSON.stringify(response.data)); return response.data.documentId; } catch (error) { console.error('Error:', error.message); throw error; } } GetData();
In the example code above, by setting EnablePrintAndSign to true, the document will be sent to the signer, who can then proceed to print and sign it.