我们有一个要求,我们需要使用HTML链接向用户提供几个PDF表单进行签名,但签名者应该是自签名者。换句话说,一旦签名者使用Docusign完成签名,他们就应该能够下载签名的文档。但是,如果HTML链接不想接收这些已保存的文档,因为它们具有个人身份信息,我们将作为发送者。签名者将在稍后将这些文档单独上传到我们的应用程序中。
我搜索了一下,但找不到一种为自签名者生成HTML链接的方法。我能够创建一个适用于普通签名者的原型,但不适用于自签名者。
任何帮助都将不胜感激。下面是我现在的代码片段:
// specify the document we want signed
string SignTest1File = @"C:\Users\skosuri.AA\Desktop\of0306.pdf";
string SignTest2File = @"C:\Users\skosuri.AA\Desktop\epa-credit-release-authorization.pdf";
// Enter recipient (signer) name and email address
string recipientName = "Chris";
string recipientEmail = "xxx.xxx@epa.gov";
// instantiate api client with appropriate environment (for production change to www.docusign.net/restapi)
string basePath = "https://demo.docusign.net/restapi";
// instantiate a new api client
ApiClient apiClient = new ApiClient(basePath);
// set client in global config so we don't need to pass it to each API object
Configuration.Default.ApiClient = apiClient;
string authHeader = "{\"Username\":\"" + Username + "\", \"Password\":\"" + Password + "\", \"IntegratorKey\":\"" + IntegratorKey + "\"}";
Configuration.Default.AddDefaultHeader("X-DocuSign-Authentication", authHeader);
// we will retrieve this from the login() results
string accountId = null;
// the authentication api uses the apiClient (and X-DocuSign-Authentication header) that are set in Configuration object
AuthenticationApi authApi = new AuthenticationApi();
LoginInformation loginInfo = authApi.Login();
// user might be a member of multiple accounts
accountId = loginInfo.LoginAccounts[0].AccountId;
Console.WriteLine("LoginInformation: {0}", loginInfo.ToJson());
// Read a file from disk to use as a document
byte[] fileBytes = File.ReadAllBytes(SignTest1File);
byte[] fileBytes2 = File.ReadAllBytes(SignTest2File);
EnvelopeDefinition envDef = new EnvelopeDefinition();
envDef.EmailSubject = "Please complete and sign these documents";
// Add a document to the envelope
Document doc = new Document();
doc.DocumentBase64 = System.Convert.ToBase64String(fileBytes);
doc.Name = "of0306.pdf";
doc.DocumentId = "1";
doc.TransformPdfFields = "true";
envDef.Documents = new List<Document>();
envDef.Documents.Add(doc);
// Add a second document to the envelope
Document doc2 = new Document();
doc2.DocumentBase64 = System.Convert.ToBase64String(fileBytes2);
doc2.Name = "epa-credit-release-authorization.pdf";
doc2.DocumentId = "2";
doc2.TransformPdfFields = "true";
envDef.Documents.Add(doc2);
// Add a recipient to sign the documeent
Signer signer = new Signer();
signer.Name = recipientName;
signer.Email = recipientEmail;
signer.RecipientId = "1";
signer.DefaultRecipient = "true";
// must set |clientUserId| to embed the recipient
signer.ClientUserId = "1234";
// Create a |SignHere| tab on the document for the recipient to sign
signer.Tabs = new Tabs();
signer.Tabs.SignHereTabs = new List<SignHere>();
signer.Tabs.DateSignedTabs = new List<DateSigned>();
signer.Tabs.FullNameTabs = new List<FullName>();
SignHere signHere = new SignHere();
signHere.AnchorString = "Applicant's Signature:";
signHere.AnchorXOffset = "1.5";
signHere.AnchorYOffset = "0";
signHere.AnchorIgnoreIfNotPresent = "false";
signHere.AnchorUnits = "inches";
signHere.DocumentId = "1";
signHere.RecipientId = "1";
signer.Tabs.SignHereTabs.Add(signHere);
DateSigned ds = new DateSigned();
ds.PageNumber = "3";
ds.XPosition = "380";
ds.YPosition = "550";
ds.DocumentId = "1";
ds.RecipientId = "1";
ds.TabLabel = "Date Signed";
signer.Tabs.DateSignedTabs.Add(ds);
// Create a |SignHere| tab on the second document for the recipient to sign
SignHere signHere2 = new SignHere();
signHere2.PageNumber = "1";
signHere2.XPosition = "80";
signHere2.YPosition = "375";
signHere2.DocumentId = "2";
signHere2.RecipientId = "1";
signer.Tabs.SignHereTabs.Add(signHere2);
FullName fn = new FullName();
fn.PageNumber = "1";
fn.XPosition = "80";
fn.YPosition = "300";
fn.DocumentId = "2";
fn.RecipientId = "1";
signer.Tabs.FullNameTabs.Add(fn);
DateSigned ds2 = new DateSigned();
ds2.PageNumber = "1";
ds2.XPosition = "80";
ds2.YPosition = "475";
ds2.DocumentId = "2";
ds2.RecipientId = "1";
signer.Tabs.DateSignedTabs.Add(ds2);
envDef.Recipients = new Recipients();
envDef.Recipients.Signers = new List<Signer>();
envDef.Recipients.Signers.Add(signer);
// set envelope status to "sent" to immediately send the signature request
envDef.Status = "sent";
// Use the EnvelopesApi to create and send the signature request
EnvelopesApi envelopesApi = new EnvelopesApi();
EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(accountId, envDef);
Console.WriteLine("EnvelopeSummary:\n{0}", JsonConvert.SerializeObject(envelopeSummary));
RecipientViewRequest viewOptions = new RecipientViewRequest()
{
ReturnUrl = "https://www.epa.gov",
ClientUserId = "1234", // must match clientUserId set in step #2!
AuthenticationMethod = "email",
UserName = recipientName,
Email = recipientEmail
};
// create the recipient view (aka signing URL)
ViewUrl recipientView = envelopesApi.CreateRecipientView(accountId, envelopeSummary.EnvelopeId, viewOptions);
// print the JSON response
Console.WriteLine("ViewUrl:\n{0}", JsonConvert.SerializeObject(recipientView));
// Start the embedded signing session!
System.Diagnostics.Process.Start(recipientView.Url);
发布于 2016-05-25 05:01:25
我不太明白你的问题。
您的应用程序可以使用“系统用户”(电子邮件帐户,如"noreply@company.com")作为发送者,并向“自签名者”提供嵌入的签名请求。
这样,“自我签名者”就可以填写信息并签名。
已签名的文档将仅对系统用户可见(通过DocuSign)。您还可以设置清除策略。
但是,这不是友好的用户体验,要求
signer将在稍后将这些文档单独上传到我们的应用程序中。
相反,我建议您检查文本(数据)选项卡的concealValueOnDocument
参数。
文档:
如果设置为true,则当收件人添加或修改字段中的信息时,该字段将正常显示,但数据对任何其他签名者或发件人都不可见(字符由星号隐藏)。
完成信封后,发件人可以通过DocuSign控制台中的表单数据链接获取信息。此设置仅适用于文本框,不影响列表框、单选按钮或复选框。
使用此设置可使签名者在签名时看到PII,但信息对后续签名者或信息查看者不可见。
PII数据仍然可以通过API获得,因此您的集成可以根据需要对其进行处理。
https://stackoverflow.com/questions/37418483
复制相似问题