Integration using PDF tags


As alternative to creating form fields from the API, Bulksign also supports an alternative method by appending a specific text (called tag) inside of the PDF document. These tags will be parsed and converted to form fields. Tags for the following form fields are supported : signatures, attachments, textbox, combobox and checkbox

  • attachments

Notes : - NO spaces are allowed inside the tag "[[!" and "]]" . If the tag contains spaces, it will not be processed as a tag.

  • the tag text must be on a single line. If the text goes over on a new line, it will NOT be processed as a tag.

  • the text of the tag can be "invisible", using the white color. We recommend white text and font size of 7px.

  • the form field created from the tag is positioned in the document where the tag starts



Signature Tags

Here is how a sample signature tag looks like :

[[!mySignature:1:signature(sigType=ClickToSign):size(width=100,height=20)]]


The tag components are :

mySignature : the identifier of the signature field

1 : the index of the signer to which the signature will be assigned to.

signature : the type of the form field which will be added to the PDF document

sigType=ClickToSign : The type of the signature field to be added

size(width=100,height=20) : The size of the signature field

The following signature types are supported: DrawTypeToSign, ClickToSign, OtpSign, LocalCertificate, Stamp, Automatic

For automatic signatures it's possible to specify the identifier of the automatic signature profile that you want to be used. Example :

[[!mySignature:1:signature(sigType=Automatic,Identifier=12345678):size(width=100,height=20)]]

If no identifier is specified, the first (based on the creation date) organization automatic signature profile will be used.



Attachment Tags

[[!idAttachment:1:attachment(text=Please_attach_your_id_card)]]

Important!

Please note the attachment text must use "_" instead of space, because of the no spaces request.

Please note that, when using PrepareSendEnvelope API with documents that contain attachment tags, these attachments will be returned as "NewAttachments".



TextBox Tags

[[!textInvoiceNumber:1:textbox(IsRequired=false):options(default=7436354V25612):size(width=100,height=50)]]

The following attributes are available :

IsRequired : determines if the user is required or not to enter data into the textbox. Default : optional, if you need to set a default value for the text



ComboBox Tags

[[!comboCities:1:combobox(options=London,Amsterdam,New_York):options(default=Amsterdam):size(width=100,height=40)]]

The following attributes are available :

Options : set the ComboBox items. Default : set the item selected by default.



CheckBox Tags

[[!c1:1:checkbox(IsRequired=true):size(width=30,height=40):options(checked=false)]]

The following attributes are available :

IsRequired : option to set if it's required for the user to check the checkbox. Default : the bool flag which determines the default status of the checkbox (checked or not).



Annotation Tags

The following annotation tags are available :

  • Sender Name : will write the name of the envelope sender
  • Sender Email : will write the email address of the envelope sender
  • Organization Name : will write the name of the organization.
[[!SenderEmail:options(FontSize=17)]]

[[!OrganizationName:options(FontSize=17)]]

[[!SenderName:options(FontSize=10)]]

The following attributes are required :

FontSize : the size of the font, must be between 3 and 39. If the font size is invalid, the size will be set to 14 (the default).



UI Integration

To process document tags, this needs to be enabled from Settings \ Policies. There are 2 options there specifically for tags :

  • "Parse uploaded documents for tag" : if this is enabled, all documents uploaded from UI will be parsed for tags.

  • "Delete tag text from document after creating form fields" : if this option is enabled, the tag text will be deleted from the document

Important!

Do NOT enable the option "Delete tag text from document after creating form fields" if you are upload PDF documents which already contain signed fields. These signatures will then be invalidated.



API integration

The following APIs allow you to specify how to work with tags per each API request :

  • PrepareSendEnvelope
  • AddDocumentsRecipientsToDraft
  • AddDocumentsRecipientsToTemplate

This is specified using the "DocumentParseOptions" :

{
    ParseTags : true,
    DeleteTagText : false
}

ParseTags : if enabled, the document will be parsed for tags. DeleteTagText : if this is enabled, the tag text will be REMOVED from the document.

  • AnalyzeFileInput, AnalyzeFile and AnalyzeFileBase64 are NOT processing tags, those API are meant to work only with existing PDF form fields.

  • CreateDraft, CreateDraftFromFile, CreateDraftFromFileBase64 : these APIs will use the tag document parsing settings which are set in the UI.