This tutorial shows you how to define hyperlinks on your document with the API.
Use Case Description
In case you want to send a document with one to many URLs to other websites it could be better for the recipient to just click on the links and another tab in the browser opens with the correct website instead of continuously copy paste the links to open them.
Integration
To define hyperlinks on the document you have to do the following steps:
- Upload a document (PDF)
- Configure the hyperlink(s) in the workstep configuration
- Send the envelope
After uploading the document you now have to configure the hyperlink(s) in the workstep configuration.
Generally you can define the following settings for links:
- Id
- DocRefNumber
- PositionPage
- Uri (target link)
- Position (x and y)
- Size (height and width)
You can find a sample configuration of two hyperlinks in the following section:
"HyperLinks": [ { "Id": "c238bd01-78ca-4958-a6dc-957fed629aa0", "DocRefNumber": 1, "PositionPage": 1, "Uri": "https://www.esignanywhere.net/", "Position": { "PositionX": 346.0, "PositionY": 707.0 }, "Size": { "Height": 15.0, "Width": 152.0 } }, { "Id": "667f0c4b-4e2c-4aa8-b401-f5c5963ca314", "DocRefNumber": 1, "PositionPage": 1, "Uri": "https://demo.xyzmo.com/", "Position": { "PositionX": 302.0, "PositionY": 663.0 }, "Size": { "Height": 15.0, "Width": 119.0 } } ],
A complete workstep configuration with two hyperlinks can be found in the next section:
Please replace the placeholders ##…## with your email address and your name.
{ "SspFileIds": [ "##FileId##" ], "SendEnvelopeDescription": { "Name": "test", "EmailSubject": "Please sign the enclosed envelope", "EmailBody": "Dear #RecipientFirstName# #RecipientLastName#\n\n#PersonalMessage#\n\nPlease sign the envelope #EnvelopeName#\n\nEnvelope will expire at #ExpirationDate#", "DisplayedEmailSender": "", "EnableReminders": true, "FirstReminderDayAmount": 5, "RecurrentReminderDayAmount": 3, "BeforeExpirationDayAmount": 3, "DaysUntilExpire": 28, "CallbackUrl": "", "StatusUpdateCallbackUrl": "", "Steps": [ { "OrderIndex": 1, "Recipients": [ { "Email": "##EMAIL##", "FirstName": "##NAME##", "LastName": "##NAME##", "LanguageCode": "en", "EmailBodyExtra": "", "DisableEmail": false, "AddAndroidAppLink": false, "AddIosAppLink": false, "AddWindowsAppLink": false, "AllowDelegation": true, "AllowAccessFinishedWorkstep": false, "SkipExternalDataValidation": false, "AuthenticationMethods": [] } ], "EmailBodyExtra": "", "RecipientType": "Signer", "WorkstepConfiguration": { "WorkstepLabel": "test", "SmallTextZoomFactorPercent": 100, "FinishAction": { "ServerActions": [], "ClientActions": [] }, "ReceiverInformation": { "UserInformation": { "FirstName": "##NAME##", "LastName": "##NAME##", "EMail": "##EMAIL##" }, "TransactionCodePushPluginData": [] }, "SenderInformation": { "UserInformation": { "FirstName": "##NAME##", "LastName": "##NAME##", "EMail": "##EMAIL##" } }, "TransactionCodeConfigurations": [ { "Id": "smsAuthTransactionCodeId", "HashAlgorithmIdentifier": "Sha256", "Texts": [ ] } ], "SignatureConfigurations": [], "ViewerPreferences": { "FinishWorkstepOnOpen": false, "VisibleAreaOptions": { "AllowedDomain": "*", "Enabled": false } }, "ResourceUris": { "DelegationUri": "http://beta4.testlab.xyzmo.com//Resource/Delegate", "SignatureImagesUri": "http://beta4.testlab.xyzmo.com//Resource/SignatureImages/?link=1TaH1SF291vorf60lEYDFbY~UTJ3w~9b~Idf~~9goGeM4QZ7CEWq6~dzLXgGqkAnX" }, "AuditingToolsConfiguration": { "WriteAuditTrail": false, "NotificationConfiguration": {} }, "Policy": { "GeneralPolicies": { "AllowSaveDocument": true, "AllowSaveAuditTrail": true, "AllowRotatingPages": false, "AllowEmailDocument": true, "AllowPrintDocument": true, "AllowFinishWorkstep": true, "AllowRejectWorkstep": true, "AllowRejectWorkstepDelegation": true, "AllowUndoLastAction": false, "AllowAdhocPdfAttachments": false, "AllowAdhocSignatures": false, "AllowAdhocStampings": false, "AllowAdhocFreeHandAnnotations": false, "AllowAdhocTypewriterAnnotations": false, "AllowAdhocPictureAnnotations": false, "AllowAdhocPdfPageAppending": false }, "WorkstepTasks": { "PictureAnnotationMinResolution": 0, "PictureAnnotationMaxResolution": 0, "PictureAnnotationColorDepth": "Color16M", "SequenceMode": "NoSequenceEnforced", "PositionUnits": "PdfUnits", "ReferenceCorner": "Lower_Left", "Tasks": [ { "Texts": [ { "Language": "*", "Value": "Signature Disclosure Text" }, { "Language": "en", "Value": "Signature Disclosure Text" } ], "Headings": [ { "Language": "*", "Value": "Signature Disclosure Subject" }, { "Language": "en", "Value": "Signature Disclosure Subject" } ], "IsRequired": false, "Id": "ra", "DisplayName": "ra", "DocRefNumber": 1, "DiscriminatorType": "Agreements" } ] } }, "Navigation": { "HyperLinks": [ { "Id": "c238bd01-78ca-4958-a6dc-957fed629aa0", "DocRefNumber": 1, "PositionPage": 1, "Uri": "https://www.esignanywhere.net/", "Position": { "PositionX": 346.0, "PositionY": 707.0 }, "Size": { "Height": 15.0, "Width": 152.0 } }, { "Id": "667f0c4b-4e2c-4aa8-b401-f5c5963ca314", "DocRefNumber": 1, "PositionPage": 1, "Uri": "https://demo.xyzmo.com/", "Position": { "PositionX": 302.0, "PositionY": 663.0 }, "Size": { "Height": 15.0, "Width": 119.0 } } ], "Links": [], "LinkTargets": [] } }, "DocumentOptions": [ { "DocumentReference": "1", "IsHidden": false } ], "UseDefaultAgreements": true }, { "OrderIndex": 2, "Recipients": [ { "Email": "##EMAIL##", "FirstName": "##NAME##", "LastName": "##NAME##", "LanguageCode": "en", "EmailBodyExtra": "", "DisableEmail": false, "AddAndroidAppLink": false, "AddIosAppLink": false, "AddWindowsAppLink": false, "AllowDelegation": false, "SkipExternalDataValidation": false, "AuthenticationMethods": [] } ], "EmailBodyExtra": "", "RecipientType": "Cc", "DocumentOptions": [], "UseDefaultAgreements": false } ], "AddFormFields": { "Forms": { "1": [ { "Value": "", "MaxLength": -1, "IsMultiline": false, "IsPassword": false, "IsComb": false, "TextColor": "0, 0, 0", "FontSize": 11.0, "FontName": "Times New Roman", "Bold": false, "Italic": false, "TextAlign": "Left", "Name": "TextBox_fc2759f5-b1f5-968f-4d3e-c17e168ec5a3", "ReadOnly": false, "Required": false, "X": 302.0, "Y": 663.0, "Width": 119.0, "Height": 15.0, "Page": 1, "DiscriminatorType": "AddTextBoxFormFieldDescriptor" } ] } }, "OverrideFormFieldValues": { "Forms": {} }, "AttachSignedDocumentsToEnvelopeLog": false } }
Please see also the next video: