gyurko

Click to Sign showing at Top-Left Corner of Document

0 votes
I was trying to figure out why the "Click to Sign" Box was showing up in the top left corner of the Document. My assumption was that it meant that I was not properly placing it as an offset to an Anchor, Even though my Code does try to do that. But I realized as I was formatting my question that I had an extra .WithField (in bold) that was causing the problem. Sure enough, removing that extra code fixed my problem. Even though I answered my own question, I thought it was worth posting. My .Net Code for the "Rider" is as follows: The Anchors, XName, XTitle, XSignature and XDate are all in the PDF as white Text. .WithDocument(DocumentBuilder.NewDocumentNamed("Rider") .WithId(Doc2) .FromStream(msInt, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(GetEmail) .WithField(FieldBuilder.TextField() .WithPositionAnchor(TextAnchorBuilder.NewTextAnchor("XName") .AtPosition(TextAnchorPosition.TOPRIGHT) .WithSize(180, 17) .WithOffset(0, -20) .WithCharacter(0) .WithOccurrence(1) ) ) .WithField(FieldBuilder.TextField() .WithPositionAnchor(TextAnchorBuilder.NewTextAnchor("XTitle") .AtPosition(TextAnchorPosition.TOPRIGHT) .WithSize(180, 17) .WithOffset(0, -20) .WithCharacter(0) .WithOccurrence(1)) ) .WithField(FieldBuilder.SignerName() .WithPositionAnchor(TextAnchorBuilder.NewTextAnchor("XSignature") .AtPosition(TextAnchorPosition.TOPRIGHT) .WithSize(180, 17) .WithOffset(0, -20) .WithCharacter(0) .WithOccurrence(1)) ) .WithField(FieldBuilder.SignatureDate() .WithPositionAnchor(TextAnchorBuilder.NewTextAnchor("XDate") .AtPosition(TextAnchorPosition.TOPRIGHT) .WithSize(180, 17) .WithCharacter(0) .WithOffset(0, -20) .WithOccurrence(1)) ) )

Reply to: Click to Sign showing at Top-Left Corner of Document

0 votes
Hey gyurko, Thanks for sharing this and glad that you figured out yourself! Indeed, when setting text anchors, you don't need to add ".WithField" function for signature object (although in JSON level, signature is also a "field" under "approval"). This extra code will make OneSpan Sign system thought there's no text anchor binded for the signature and therefore showed up at top-left corner(0,0) with default size. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


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