This simple Apex class shows you how to use the Text Tag extraction feature with the Apex SDK. Inluded in the zip file is the PDF used for this example.
To notice: some functions are extended from Apex SDK, so please copy paste all dependent functions when testing in your own code.
Rate this Code Share
Reply to: Text Tag Extraction (Apex SDK)Wednesday, January 13, 2021 at 04:43pm
It looks like something may have changed on this, as the ESignLiveAPIObjects.Data is different than the current OneSpanAPIObjects.Data. There is no field esl_docextract_type, only ese_document_texttag_extract_needed, which is a private member anyway.
TLDR, this code no longer works, and throws a 400 Bad Request error that no approvals were added to the package (when they should be added by the text extraction.
Reply to: It looks like something may…Thursday, June 10, 2021 at 09:22am
Sorry for the late reply! The easiest workaround is to contact support team and turn on the "always extract text tags". It's a package level setting, which is not part of the APEX SDK modelling.
Another solution is to modify the OneSpanAPIObjects.cls line 242 to:
public String esl_doc_extract_type;
And reference the attribute with:
I believe this is the same as the old SDK modelling.
PS: Next time if you had any other questions, please don't hesitate to directly make a new post rather than reply to the code share thread.
Reply to: Text Tag Extraction (Apex SDK)Tuesday, September 28, 2021 at 02:17pm
When I download the code sample I get an empty file. Is it just me?
Reply to: When I download the code…Tuesday, September 28, 2021 at 02:24pm
Thanks for bringing it up to us! I have re-uploaded the attachment and now you should get the sample code.