Skip to content

Commit 256c063

Browse files
committed
Fixing issue with ApplyBrandToEnvelope code example
1 parent 7557367 commit 256c063

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

launcher-csharp.Tests/eSignatureUnitTests/ApplyBrandToEnvelopeUnitTests.cs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ public void CreateEnvelopeUsingBrand_CorrectInputParameters_ReturnsEnvelopeDefin
6565
var anchorUnits = "pixels";
6666
var anchorYOffset = "10";
6767
var anchorXOffset = "20";
68-
var anchorStringOne = "**signature_1**";
69-
var anchorStringTwo = "/sn1/";
68+
var anchorString = "/sn1/";
7069
var emailSubject = "Please sign this document set";
7170

7271
string docPdfBytes = Convert.ToBase64String(System.IO.File.ReadAllBytes(docPdf));
@@ -93,25 +92,17 @@ public void CreateEnvelopeUsingBrand_CorrectInputParameters_ReturnsEnvelopeDefin
9392
RoutingOrder = defaultId,
9493
};
9594

96-
var signHere1 = new SignHere
95+
var signHere = new SignHere
9796
{
98-
AnchorString = anchorStringOne,
99-
AnchorUnits = anchorUnits,
100-
AnchorYOffset = anchorYOffset,
101-
AnchorXOffset = anchorXOffset,
102-
};
103-
104-
var signHere2 = new SignHere
105-
{
106-
AnchorString = anchorStringTwo,
97+
AnchorString = anchorString,
10798
AnchorUnits = anchorUnits,
10899
AnchorYOffset = anchorYOffset,
109100
AnchorXOffset = anchorXOffset,
110101
};
111102

112103
var signerTabs = new Tabs
113104
{
114-
SignHereTabs = new List<SignHere> { signHere1, signHere2 },
105+
SignHereTabs = new List<SignHere> { signHere }
115106
};
116107
signer.Tabs = signerTabs;
117108

launcher-csharp/eSignature/Examples/ApplyBrandToEnvelope.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,8 @@ public static EnvelopeDefinition CreateEnvelope(string signerEmail, string signe
7979
// We're using anchor (autoPlace) positioning
8080
//
8181
// The DocuSign platform searches throughout your envelope's
82-
// documents for matching anchor strings. So the
83-
// signHere2 tab will be used in both document 2 and 3 since they
84-
// use the same anchor string for their "signer 1" tabs.
85-
SignHere signHere1 = new SignHere
86-
{
87-
AnchorString = "**signature_1**",
88-
AnchorUnits = "pixels",
89-
AnchorYOffset = "10",
90-
AnchorXOffset = "20",
91-
};
92-
93-
SignHere signHere2 = new SignHere
82+
// documents for matching anchor strings.
83+
SignHere signHere = new SignHere
9484
{
9585
AnchorString = "/sn1/",
9686
AnchorUnits = "pixels",
@@ -101,7 +91,7 @@ public static EnvelopeDefinition CreateEnvelope(string signerEmail, string signe
10191
// Tabs are set per recipient / signer
10292
Tabs signer1Tabs = new Tabs
10393
{
104-
SignHereTabs = new List<SignHere> { signHere1, signHere2 },
94+
SignHereTabs = new List<SignHere> { signHere }
10595
};
10696
signer1.Tabs = signer1Tabs;
10797

0 commit comments

Comments
 (0)