Appearance
Document Source
Documents to be processed for signature, receipt, or delivery by AlphaTrust® e-Sign are read into the AlphaTrust® e-Sign document repository as part of the transaction creation process. The location of each document in which AlphaTrust® e-Sign is to access it is specified in the Source
property.
There are three Source
properties, FilePath
, FileBytes
, and FileUrl
. If AlphaTrust® e-Sign does not have direct network or internet access to the document that needs to be signed, use the FileBytes
property to pass in the byte array of the PDF or HTML document.
csharp
document = new DocumentInsertModel()
{
...
Source = new SourceModel()
{
FileBytes = System.IO.File.ReadAllBytes(@"c:\myDocument.pdf")
}
...
}
If AlphaTrust® e-Sign does have direct network access to the document that needs to be signed, use the FilePath
property to pass in the network path. Local or UNC paths are supported but mapped drives are not since the user has to be actively logged in for the mapped drive to be used.
csharp
document = new DocumentInsertModel()
{
...
Source = new SourceModel()
{
FilePath = @"\\My_Pronto_Accessible_Network_Share\myDocument.pdf")
}
...
}
A second way to use the FilePath
property is to reference documents that have been uploaded into the Control Panel's Document Templates section (shown in the image below).
If a document exists in this repository, you can omit the full path and just use the name of the document as the FilePath
property value. If the system sees that the FilePath
is a relative path, it will automatically look in the Document Templates repository for the file. If the file does not exist, an error will be returned.
csharp
document = new DocumentInsertModel()
{
...
Source = new SourceModel()
{
FilePath = @"myDocument.pdf"
}
...
}