alfredohrv | Posts: 27

OneSpanSign.Sdk.Builder

0 votes

In my MVC code project testing creating a Package I am trying to add a .WithSignatureStyle and  .WithSignatureType. and the SDK says it does not have a definition of neither one in the builder.
The issue is that the signature option only comes up as drawing.

 


Approved Answer
Duo_Liang | Posts: 3776

Reply to: OneSpanSign.Sdk.Builder

0 votes

I see, the PDF you provided is using document extraction feature, see the attachment where there are two PDF form fields with specific property name. If you modified these two form's name to:
[Signer.Fullname1]

[Signer.Fullname1.label1.Date]

 

This will switch the signature type to click-to-sign.

 

Duo


Attachments
Duo_Liang | Posts: 3776

Reply to: OneSpanSign.Sdk.Builder

0 votes

Hi Alfredo,

 

Thanks for your post! If you are developing with .NET sdk and trying to add signature of different types, use code around below lines:

DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed("Test Package .NET")
 .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")
       .WithFirstName("Signer First Name")
       .WithLastName("Signer Last Name")
       .WithCustomId("Signer1"))
 .WithDocument(DocumentBuilder.NewDocumentNamed("sampleAgreement")
       .FromStream(fs, DocumentType.PDF)
       .WithSignature(SignatureBuilder
         .SignatureFor("[email protected]")
         .OnPage(0)
         .AtPosition(175, 165))
       .WithSignature(SignatureBuilder
         .InitialsFor("[email protected]")
         .OnPage(0)
         .AtPosition(175, 265))
       .WithSignature(SignatureBuilder
         .CaptureFor("[email protected]")
         .OnPage(0)
         .AtPosition(175, 365))
       ) 
       .Build();    

 

Duo

 


alfredohrv | Posts: 27

Reply to: OneSpanSign.Sdk.Builder

0 votes

Too bad. I was trying to get away from doing .AtPosition(175, 165). My code automatically knows where the signature goes and the only issues is that it only comes as drawing. Should it ask what you prefer automatically?


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off