From ddb162e7403a383277da7b84668643b6e417f8c4 Mon Sep 17 00:00:00 2001 From: Karissa Jacobsen Date: Thu, 14 Mar 2024 11:41:54 -0700 Subject: [PATCH 1/3] adding blank line after closing brace to fix automation --- .../Examples/CreateEnvelopeWithMultipleDocumentTypes.cs | 1 + launcher-csharp/eSignature/Examples/EmbeddedSending.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/launcher-csharp/eSignature/Examples/CreateEnvelopeWithMultipleDocumentTypes.cs b/launcher-csharp/eSignature/Examples/CreateEnvelopeWithMultipleDocumentTypes.cs index 5bf8262d..89b81676 100644 --- a/launcher-csharp/eSignature/Examples/CreateEnvelopeWithMultipleDocumentTypes.cs +++ b/launcher-csharp/eSignature/Examples/CreateEnvelopeWithMultipleDocumentTypes.cs @@ -118,6 +118,7 @@ public static (bool statusOk, string envelopeId, string errorCode, string errorM buffer.Write(crlf); buffer.Flush(); } + //ds-snippet-start:eSign10Step4 WebResponse response = null; WebException webEx = null; diff --git a/launcher-csharp/eSignature/Examples/EmbeddedSending.cs b/launcher-csharp/eSignature/Examples/EmbeddedSending.cs index 7247c097..a9df11c2 100644 --- a/launcher-csharp/eSignature/Examples/EmbeddedSending.cs +++ b/launcher-csharp/eSignature/Examples/EmbeddedSending.cs @@ -58,6 +58,7 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string { redirectUrl = redirectUrl.Replace("send=1", "send=0"); } + //ds-snippet-end:eSign11Step3 return redirectUrl; @@ -217,6 +218,7 @@ private static byte[] Document1(string signerEmail, string signerName, string cc " \n" + " "); } + //ds-snippet-end:eSign11Step2 } } From ab968b791e31f5b169c02b18e68fd99609915895 Mon Sep 17 00:00:00 2001 From: RomanBachaloSigmaSoftware Date: Wed, 20 Mar 2024 16:25:47 +0200 Subject: [PATCH 2/3] add EnforceSignerVisibility --- launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs b/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs index ca243343..085509fd 100644 --- a/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs +++ b/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs @@ -82,6 +82,7 @@ private static EnvelopeDefinition PrepareEnvelope( { EmailSubject = "Please sign this document set", Documents = PrepareDocumentsForTemplate(docPdf, docDocx, docHtml), + EnforceSignerVisibility = "true", }; Signer signer1 = PrepareSigner( From c17bb7c6a5fa05e92515fd29e835f0d9a1f8e6c5 Mon Sep 17 00:00:00 2001 From: annahileta Date: Wed, 27 Mar 2024 15:05:50 +0200 Subject: [PATCH 3/3] Added name and email of signer to the document in Document Visibility --- launcher-csharp/doc_1.html | 1 + .../Examples/SetDocumentVisibility.cs | 26 ++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/launcher-csharp/doc_1.html b/launcher-csharp/doc_1.html index be6ec517..f11b1d6b 100644 --- a/launcher-csharp/doc_1.html +++ b/launcher-csharp/doc_1.html @@ -11,6 +11,7 @@ color: darkblue;">Order Processing Division

Ordered by {USER_FULLNAME}

Email: {USER_EMAIL}

+

Copy to: {CC_NAME}, {CC_EMAIL}

Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie. Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée. Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice. Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.

diff --git a/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs b/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs index 085509fd..2cd451e2 100644 --- a/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs +++ b/launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs @@ -81,7 +81,14 @@ private static EnvelopeDefinition PrepareEnvelope( EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition { EmailSubject = "Please sign this document set", - Documents = PrepareDocumentsForTemplate(docPdf, docDocx, docHtml), + Documents = PrepareDocumentsForTemplate( + signer1Email, + signer1Name, + ccEmail, + ccName, + docPdf, + docDocx, + docHtml), EnforceSignerVisibility = "true", }; @@ -159,11 +166,24 @@ private static Signer PrepareSigner( }; } - private static List PrepareDocumentsForTemplate(string docPdf, string docDocx, string docHtml) + private static List PrepareDocumentsForTemplate( + string signer1Email, + string signer1Name, + string ccEmail, + string ccName, + string docPdf, + string docDocx, + string docHtml) { byte[] pdfFileContentInBytes = System.IO.File.ReadAllBytes(docPdf); byte[] docxFileContentInBytes = System.IO.File.ReadAllBytes(docDocx); - byte[] htlmFileContentInBytes = System.IO.File.ReadAllBytes(docHtml); + + string htmlFileContentsString = System.IO.File.ReadAllText(docHtml); + htmlFileContentsString = htmlFileContentsString.Replace("{USER_EMAIL}", signer1Email); + htmlFileContentsString = htmlFileContentsString.Replace("{USER_FULLNAME}", signer1Name); + htmlFileContentsString = htmlFileContentsString.Replace("{CC_EMAIL}", ccEmail); + htmlFileContentsString = htmlFileContentsString.Replace("{CC_NAME}", ccName); + byte[] htlmFileContentInBytes = System.Text.Encoding.UTF8.GetBytes(htmlFileContentsString); return new List {