Joemckairnes

Text Anchor - multiple locations

0 votes
I have the same text in multiple locations in a document, and I want a signer to sign each of them. Using Text Anchor since there are a random number of pages. I want to place a signature block relative to the phrase “Lessor:” There may be 1 location, or 100……. How do I tell eSL to do this? I know how to do a text anchor, but how do I handle multiple locations? Do I somehow need to ‘iterate’ through the doc and place all of these blocks…..

Reply to: Text Anchor - multiple locations

1 votes
Hey Joe, If you use a library like iText to figure out how many instances of the string in question you have, you can set up a loop to add the signature locations based on the number of occurrences you find in the document:
int occurrences = 0;
PdfReader pdfReader;
		
pdfReader = new PdfReader("PATH_TO_FILE/sampleAgreement.pdf");
for (int page = 1; page 

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Reply to: Text Anchor - multiple locations

0 votes
Hi, Can the first loop in the above code (the one that counts # of occurrences ) be avoided? If the document is a long document then there is considerable drag on the performance. Ideally, the second loop (the one that adds signature blocks) should do it automatically since it is anyways parsing / looping through the document. please suggest how we can improve the performance, specifically for large 100+ page documents which require signature on each page. thanks Neel

Reply to: Text Anchor - multiple locations

0 votes
Hi, As Neel mentioned in the earlier message, we have a requirement to insert signature blocks in over 100 locations for documents that have 100+ pages. When trying to do it I get the error message "504 Gateway Timeout Error". I am able to run the same code to insert around 40-50 signature blocks but once the number goes higher up it gives the timeout error. Kindly suggest. Thanks, Sudhangi

Reply to: Text Anchor - multiple locations

0 votes
Neel, I don't think you'd be able to avoid this loop as you need to figure out how many occurrences of the text there are. You might be able to merge the second for loop into the first one to build the doc signatures as you search for instances. This might save a little time with a long document, but probably not much. Sudhangi, are you using code similar to the code above? BTW, there is new text anchor functionality coming at some point, this year, I believe. I don't know if it will solve all of your issues, but it might help. I will ask around on this to see if there is a firm date for this feature and how it might help in this situation. I will let you know when I know more. :)

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Reply to: Text Anchor - multiple locations

0 votes
Update: Still waiting to hear back. I will let you know as soon as I hear. :)

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Reply to: Text Anchor - multiple locations

0 votes
I was told that there is no known limitation to the number of anchors. Do you have any more info on this error and where it's actually happening? Could you try a static test in a document with 100 anchors and a loop that creates 100 signature locations for these anchors (skipping the iText code that finds the number of occurrences). Also, it's been requested that you try in the new sandbox: https://sandbox.esignlive.com too, to see if the same happens.

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Reply to: Text Anchor - multiple locations

0 votes
Hi Williams, I have used following lines of code to insert 2 fields (Signature field and SignatureDate field) in multiple locations. Signatures are appearing in the multiple locations but I could not insert any SignatureDate field. for (int i = 0; i

Reply to: Text Anchor - multiple locations

0 votes
Sumit, You’ll need something like this, as the SignatureDate needs to be associated with a specific signature:
            for (int signatureoccurence = 0; signatureoccurence 
I’m not quite sure with your code what is happening with the signaturedates, as they aren’t associated with anything.

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