Prizm Content Connect
eSignature

Introduction

The Prizm Content Connect Plus eSignature is an API module that works with Prizm Content Connect Plus to allow digital signatures to be applied to documents right in the Viewer. eSignatures work just like annotations, so that they can be tracked and applied, consistent with E-SIGN Act requirements.

The Prizm Content Connect Plus eSignature solution utilizes 256-bit SSL encryption and authentication, and includes full audit trails including document viewing and signature information. This enables you to securely track the document signing process from beginning to end.

With full API support, you can batch process documents to give you even more customization control over your workflow.

The eSignature module works with Prizm Content Connect Plus to:

How the eSignature Module Works

The eSignature module provides API based tools that give you flexibility in loading or adding form fields, filling in the fields with the required digital signatures, and burning the signatures onto documents. Whether you’re looking to add electronic signature capabilities to your website, workflow, call center, operations, or internal processes, the eSignature solution can be easily integrated into the process.

eSignature form fields drawn on a document are referred to as annotations.

eSignature Modes

  1. Form Builder Mode (eSignEdit Mode)

    In this mode, the author of the document draws signature fields onto the document and saves the fields as an xml template. The xml is then combined with the document to generate fields to be filled in by the signer.



    When drawing eSignature fields, the height of the field should be based on the height of text in the document. Max height allowed is 40 pixels. Drawing large field boxes will result in large text being generated by the signer.
  2. Form Filling or Signing Mode (eSign Mode)

    In this mode, the signer fills in the form fields created by the author, thereby signing the document. The document is loaded in the Viewer along with the form field’s xml.


eSignature Steps

Getting Deeper into eSignatures

The eSignature module requires the pages specified in the settings xml to work correctly:

The settingsenterprise.xml defines the various interaction points for module to work.

Example settingsenterprise.xml
Copy Code
<settings>
<conversionFileURL>convertpage.aspx</conversionFileURL>
<getFastPagesURL>getfastpagecount.aspx</getFastPagesURL>
<getTotalPagesURL>gettotalpagecount.aspx</getTotalPagesURL>
<annotationsFilesURL>listmarkup.aspx</annotationsFilesURL>
<annotationsOpenURL>openmarkup.aspx</annotationsOpenURL>
<annotationsSaveURL>savemarkup.aspx</annotationsSaveURL>
</settings>

conversionFileURL This file does the page conversion and returns binary of the page.
This should already be set up as a part of Prizm Content Connect Plus set up.
getFastPagesURL This file calculates the fast page count in document and returns it.
This should already be set up as a part of Prizm Content Connect Plus set up.
getTotalPagesURL This file calculates the total pages in document and returns it.
This should already be set up as a part of Prizm Content Connect Plus set up.
annotationsFilesURL This is the file the viewer will call to list existing annotations when a user clicks on Load Markups button.
Arguments Passed (POST) documentname – name of the document specified as a flash variable.
Return Values xml – xml containing list of annotations related to the document.

 

Example
Copy Code
<annotationFiles>
  <annotation name="documenttest-test 1.xml" label="test 1" id="1"/>
  <annotation name="documenttest-test 2.xml" label="test 1" id="2"/>
  <annotation name="documenttest-test 3.xml" label="test 1" id="3"/>
</annotationFiles>

name Name of the annotation file.
label Label of annotation file which is shown to user; can be anything or name of the file itself.
id Id of annotation file; can be anything numeric.
annotationsOpenURL This file is called by the viewer when a user clicks on an annotation label from the list of annotations received from annotationsFilesURL.
Arguments Passed (POST)

documentname – name of the document specified as a flash variable.
annotationName - name of the annotation file as returned by xml from annotationsFilesURL. annotationId - id of the annotation file as returned by xml from annotationsFilesURL.
annotationLabel- label of the annotation file as returned by xml from annotationsFilesURL.

Return Values Annotation XML file in binary format.
annotationsSaveURL This file is called by the viewer when a user clicks on Save button to save annotations.
Arguments Passed documentname – name of the document specified as a flash variable
annotations - the annotation related data in xml form. POST format
annotationName - the name of the annotation. POST format
Return Values xml specifying the file was saved successfully.

 

Example
Copy Code
<root>
<saveAnnotationResponse saved='1'/>
</root>

Multiple eSigners

Prizm Content Connect Plus with eSignature allows you to draw fields for multiple signing parties and load fields in the Viewer based on the signing party user.

In eSign Edit Mode (eSignEdit=Yes), you define the possible form users:

Ex. formUsers: 'Jack|Mary|Tim'

Now when a document is loaded in eSign Edit Mode with the formUsers flash variable set to ‘Jack|Mary|Tim’, a drop down displays the list of users in the Form Builder tab. A user can be picked from the drop down and fields can then be drawn for the specific user.

In eSign mode (eSign=Yes), you can specify signing users, such that fields for those users are loaded.

Ex. formUser:'Jack'

Now when a document is loaded in eSign Mode with formUser set as Jack, fields related to Jack are shown.

If formUser field is not defined in the ‘eSignEdit’ or ‘eSign’ mode, all fields will be shown

eSignature Parameters

Your custom code needs to appear as a 'flashvars' param variable so that it can be passed to the flash file at run time.

Given below is an example with code showing various variables.

Example
Copy Code
<script src="jquery-1.4.2.min.js” language="javascript"></script>
<script src="jquery.swfobject.1-1-1.min.js" language="javascript"></script>
<script>
documentviewer = $.flash.create(
  {
    swf: 'ViewerEnterprise.swf',
    id:''ViewerEnterprise',
    height: 600,
    width: 750,
    wmode: 'window',
    scale: 'noscale',
    allowFullScreen: true,
    allowScriptAccess: 'always',
    hasVersion: 10,
    hasVersionFail: function (options) {
    alert("You do not have required flash version");
    },
    encodeParams: false,
    bgcolor: '#ffffff',
    flashvars: {
    documentname: '<%=document %>',
    eSign:'Yes'
    }
  }
);
$(document).ready(
  function () {
    $('#documentviewer').html(documentviewer);
  }
);
</script>
<div id="documentviewer"></div>

eSignature Variables

Name Description Default Value Values
eSignEdit Loads form builder mode. This mode allows the author of a document create/draw fields on the document  - Yes/No
eSign Allows form fields to be filled on document.
(Requires loadAnnotation to work)
(Requires xml to load form fields for user to fill)
Loads a form filling wizard automatically to help user fill in the fields.
 - Yes/No
formUser The user for which fields will be drawn or shown.  - Any userid or identified or name or email of the users

Examples:
Jack|Mary|Tim

7787|dssd|4344

mary@test.com|jack@test.com|tim@test.com

hideESignDownload Hides the eSign download button when set to Yes. No Yes/No

Burning eSignature XML to Document

convert2swfclient.jar

convert2swfclient.jar provides methods to convert your documents to swf format to be used by the Viewer file.  This jar file can only be run if Prizm Proxy Server is running.

To run this utility simply type java -jar convert2swfclient.jar.

Usage java -jar convert2swfclient.jar argument1=value1 argument2=value2 ...

Refer to convert2swfclient.jar for a full list of arguments.

eSignature Related Arguments
  • source - Source file path
  • target - Target directory or target file path
    If target is empty, the result is saved to the source directory
  • esign - XML containing the eSignature & field markups. This is the xml saved from viewer.
    One XML is generated by viewer and contains redaction and annotation markups and also eSignature fields.
Example

To add esign xml to sample.doc:

java -jar convert2swf.jar source=c:\path\to\sample.doc target=c:\path\to\sample.pdf esign=c:\path\to\test.xml

where text.xml is the xml saved from viewer

Prizm Proxy Server API

Prizm has a built in HTTP & HTTPS WebServer which serves the document conversion requests and does load balancing and various other tasks.

By default, after complete installation you can check if the Prizm HTTP WebServer is running by pointing your browser to:
http://localhost:18680/convert2swf

convert2swf WebService is setup to run on port 18680 and in http mode.

Refer to convert2swfclient.jar  for a full list of arguments.

eSignature Related Arguments
  • source - Source file path
  • target - Target directory or target file path
    if target is empty, the result is saved to the source directory
  • esign - XML containing the eSignature & field markups. This is the xml saved from viewer.
    One XML is generated by viewer and contains redaction and annotation markups, and also eSignature fields.
Example To add esign xml to sample.doc:
http://localhost:18680/convert2swf?source=c:\temp\sample.doc&target=c:\temp\sample.pdf&esign=c:\projectenterpriseannotations\markups\test.xml

eSignature XML schema

eSignature XML schema (XSD) can be found in <prizm-install>\Schemas\documentAnnotations.xsd. 

Integration with Your Application

Prizm Content Connect Plus supports both real-time and batch processing of burning eSignature XML into documents.

Burning in eSignatures in Real-Time

eSignature XML created manually by a user can be burned into a document in real-time when the user clicks on the Save button in the Viewer.

  1. In settings.xml, set annotationsSaveURL as savemarkup.aspx or savemarkup.php file.
    Example
    Copy Code
    <settings>
    <conversionFileURL>convert.aspx</conversionFileURL>
    <getTotalPagesURL>gettotalpagecount.aspx</getTotalPagesURL>
    <getFastPagesURL>getfastpagecount.aspx</getFastPagesURL>
    <annotationsFilesURL>listmarkup.aspx</annotationsFilesURL>
    <annotationsOpenURL>openmarkup.aspx</annotationsOpenURL>
    <annotationsSaveURL>savemarkup.aspx</annotationsSaveURL>
    </settings>
    
  2. In documentesigned file, get the annotation xml and burn the annotation to create a new PDF version of document.
    Sample ASP C# Code for documentesigned.aspx
    Example
    Copy Code
    HttpWebRequest HttpWReq = (HttpWebRequest)WebRequest.Create("http://localhost:18680/convert2swf?source=" + originalDocument + "&target=" + targetPDFLocation) + "&esign=" + fileName;
    HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse();
    StreamReader sr = new StreamReader(HttpWResp.GetResponseStream(), System.Text.Encoding.UTF8);
    
    Sample PHP Code
    Example
    Copy Code
    # Burn the annotation to document
    $urlstring="http://localhost:18680/convert2swf?source=" . $uploaddir .$document. "&target=redacted_" . $ document.”.pdf&esign=”.$xmlfileName;
    $sign=file_get_contents($urlstring);
    

Burning in eSignatures as a Batch Job

To add esign xml to sample.doc, call the following from a batch job

http://localhost:18680/convert2swf?source=c:\ProjectEnterpriseAnnotations\sample.doc&target=c:\tempcache\redacted_sample.pdf&esign=c:\ProjectEnterpriseAnnotations\markups\test.xml

or

http://localhost:18680/convert2swf?source=/var/www/html/samplecode-enterprise/sample.doc&target=/var/www/html/samplecode-enterprise/temp/redacted_sample.pdf&esign=/var/www/html/samplecode-enterprise\markups\test.xml

where test.xml is the created xml containing signature fields.

Localization of eSignature

To localize eSignature capabilities in the Viewer, simply add the following to the Flash Variable containing the language translations that you already established.

XML shown below is a sample xml for locale=english

To generate xml for any other language or change the text, simply replace the xml nodes with local language text. Example for locale=hindi you can have xml node PreviousPage as <PreviousPage>पिछले पृष्ठ</PreviousPage>

Example
Copy Code
<ESignEditTab>Form Builder</ESignEditTab>
<ESignSignTab>eSign</ESignSignTab>
<SignCategory>Fields</SignCategory>
<SignUsersCategory>Users</SignUsersCategory>
<SignButtonSign>Signature</SignButtonSign>
<SignButtonInit>Initials</SignButtonInit>
<SignButtonDate>Date</SignButtonDate>
<SignButtonTitle>Title</SignButtonTitle>
<SignButtonText>Text</SignButtonText>
<SignButtonName>Name</SignButtonName>
<SignButtonEmail>Email</SignButtonEmail>
<SignButtonCompany>Company</SignButtonCompany>
<eSignEnterName>Enter Your Name</eSignEnterName>
<eSignReviewSignature>Review Your Signature</eSignReviewSignature>
<eSignApply>Apply</eSignApply>
<eSignDownload>Download original document without signatures</eSignDownload>
<eSignCancel>Cancel</eSignCancel>
<eSignEnterInitials>Enter Your Initials</eSignEnterInitials>
<eSignReviewInitials>Review Your Initials</eSignReviewInitials>
<eSignFill>Fill</eSignFill>
<eSignInitial>Initial</eSignInitial>
<eSignSign>Sign</eSignSign>
<eSignSignIn>You need to sign in</eSignSignIn>
<eSignInitIn>You need to initial in</eSignInitIn>
<eSignFillIn>You need to fill in</eSignFillIn>
<eSignLocations>location(s)</eSignLocations>
<eSignStepsToComplete>Steps to complete:</eSignStepsToComplete>
<eSignStartHere>Start here</eSignStartHere>
<eSignNextField>Next field</eSignNextField>
<eSignOr>Or</eSignOr>
<eSignSaveIntructions>All Steps Complete</eSignSaveIntructions>
<eSignSaveIntructions2>By clicking on eSign button, you agree to do business electronically</eSignSaveIntructions2>
<eSignSaveDocument>eSign & download signed document</eSignSaveDocument>
<eSignLabelDate>Date</eSignLabelDate>
<eSignLabelEmail>Email</eSignLabelEmail>
<eSignLabelText>Text</eSignLabelText>
<eSignLabelName>Name</eSignLabelName>
<eSignLabelTitle>Title</eSignLabelTitle>
<eSignLabelInitials>Initials</eSignLabelInitials>
<eSignLabelEnterName>Enter your Name</eSignLabelEnterName>

Deploying Sample Code

  1. Copy the sample code to C:\ProjectEnterprise (For Linux this will be: /var/www/html/samplecode-enterprise)
  2. Make sure that markups folder in C:\ProjectEnterprise has full read/write permission for all users. This is where markups will be stored. (For Linux this will be: /var/www/html/samplecode-enterprise)
  3. Open default.aspx or default.php (based on sample code chosen) and change the documentLocation parameter.
  1. Ensure that Prizm service is running in Windows ControlPanel / Services.
    You can also verify that it is running by browsing to:
      http://localhost:18680/convert2swf or http://<ipaddress>:18680/
    This should show text like this to indicate that the service is running:
      Prizm Conversion Server is running.
      Server Time: Fri Jun 24 14:58:21 PDT 2011
  2. Deploy the sample code into IIS or Apache.
  3. Browse the document in browser (default.asp/default.php) to load the eSign Mode (eSign=Yes)
      http://<servername>:port/ProjectEnterprise/default.aspx?document=Sample.doc
    or
      http://<servername>:port/samplecode-enterprise/default.php?document=Sample.doc
    where Sample.doc is the document in the C:\ProjectEnterprise or /var/www/html/ samplecode-enterprise or any other source directory you had chosen.
    where esigntemplate.xml is the xml in C:\ ProjectEnterprise\markups
  4. Browse the document in browser (default1.asp/default1.php) to load the Forms Builder eSign Edit Mode (eSignEdit=Yes)
      http://<servername>:port/ProjectEnterprise/default1.aspx?document=Sample.doc
    or
      http://<servername>:port/samplecode-enterprise/default1.php?document=Sample.doc
    where Sample.doc is the document in the c:\ProjectEnterprise or /var/www/html/ samplecode-enterprise or any other source directory you had chosen.
Any xml that you create in Forms Builder (eSignEdit Mode) should be passed to eSign Mode for eSgining.

File Details
default Load the viewer for eSigning (eSign Mode).
default1 Load the viewer in forms builder mode (eSign Edit mode).
ViewerEnterprise.swf Viewer file.
settingsenterprise.xml XML containing all files.
getfastpagecount Called by Viewer file to get page count of document.
gettotalpagecount Called by Viewer file to get actual page count of document.
convert Called by Viewer file to get page swf.
saveDocument Called by saveDocumentLocation attribute of Viewer. Allows download of original document.
saveDocumenteSigned Allows download of signed document.
documentesigned

Called after Save Annotation or eSign button is clicked.

Burns the fields into document and creates a final PDF.

listmarkup Used to list all template xml for a document.
openmarkup Used to open the template xml.
savemarkup Used to save annotation xml in both eSign and eSign Edit modes.
savexml Only used when there is an error in esigning. Allows to download xml for debugging.

When drawing eSignature fields, the height of the field should be chosen based on the height of text in the document. The maximum height is 40 pixels. Drawing large field boxes will result in larger text being applied.

 

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback