Skip to content

Commit a1dc6c9

Browse files
committed
2 parents 7dcd21f + 53bb735 commit a1dc6c9

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

launcher-csharp/doc_1.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
color: darkblue;">Order Processing Division</h2>
1212
<h4>Ordered by {USER_FULLNAME}</h4>
1313
<p style="margin-top:0em; margin-bottom:0em;">Email: {USER_EMAIL}</p>
14+
<p style="margin-top:0em; margin-bottom:0em;">Copy to: {CC_NAME}, {CC_EMAIL}</p>
1415
<p style="margin-top:3em;">
1516
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.
1617
</p>

launcher-csharp/eSignature/Examples/CreateEnvelopeWithMultipleDocumentTypes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public static (bool statusOk, string envelopeId, string errorCode, string errorM
118118
buffer.Write(crlf);
119119
buffer.Flush();
120120
}
121+
121122
//ds-snippet-start:eSign10Step4
122123
WebResponse response = null;
123124
WebException webEx = null;

launcher-csharp/eSignature/Examples/EmbeddedSending.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string
5858
{
5959
redirectUrl = redirectUrl.Replace("send=1", "send=0");
6060
}
61+
6162
//ds-snippet-end:eSign11Step3
6263

6364
return redirectUrl;
@@ -217,6 +218,7 @@ private static byte[] Document1(string signerEmail, string signerName, string cc
217218
" </body>\n" +
218219
" </html>");
219220
}
221+
220222
//ds-snippet-end:eSign11Step2
221223
}
222224
}

launcher-csharp/eSignature/Examples/SetDocumentVisibility.cs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,15 @@ private static EnvelopeDefinition PrepareEnvelope(
8181
EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition
8282
{
8383
EmailSubject = "Please sign this document set",
84-
Documents = PrepareDocumentsForTemplate(docPdf, docDocx, docHtml),
84+
Documents = PrepareDocumentsForTemplate(
85+
signer1Email,
86+
signer1Name,
87+
ccEmail,
88+
ccName,
89+
docPdf,
90+
docDocx,
91+
docHtml),
92+
EnforceSignerVisibility = "true",
8593
};
8694

8795
Signer signer1 = PrepareSigner(
@@ -158,11 +166,24 @@ private static Signer PrepareSigner(
158166
};
159167
}
160168

161-
private static List<Document> PrepareDocumentsForTemplate(string docPdf, string docDocx, string docHtml)
169+
private static List<Document> PrepareDocumentsForTemplate(
170+
string signer1Email,
171+
string signer1Name,
172+
string ccEmail,
173+
string ccName,
174+
string docPdf,
175+
string docDocx,
176+
string docHtml)
162177
{
163178
byte[] pdfFileContentInBytes = System.IO.File.ReadAllBytes(docPdf);
164179
byte[] docxFileContentInBytes = System.IO.File.ReadAllBytes(docDocx);
165-
byte[] htlmFileContentInBytes = System.IO.File.ReadAllBytes(docHtml);
180+
181+
string htmlFileContentsString = System.IO.File.ReadAllText(docHtml);
182+
htmlFileContentsString = htmlFileContentsString.Replace("{USER_EMAIL}", signer1Email);
183+
htmlFileContentsString = htmlFileContentsString.Replace("{USER_FULLNAME}", signer1Name);
184+
htmlFileContentsString = htmlFileContentsString.Replace("{CC_EMAIL}", ccEmail);
185+
htmlFileContentsString = htmlFileContentsString.Replace("{CC_NAME}", ccName);
186+
byte[] htlmFileContentInBytes = System.Text.Encoding.UTF8.GetBytes(htmlFileContentsString);
166187

167188
return new List<Document>
168189
{

0 commit comments

Comments
 (0)