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
Comments
Reply to: Text Tag Extraction (Apex SDK)
Wednesday, January 13, 2021 at 04:43pmIt 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.
Please help!
Reply to: It looks like something may…
Thursday, June 10, 2021 at 09:22amHi mrobertson,
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:
data_x.esl_doc_extract_type= '1';
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.
Duo
Reply to: Text Tag Extraction (Apex SDK)
Tuesday, September 28, 2021 at 02:17pmWhen I download the code sample I get an empty file. Is it just me?
Peter
Reply to: When I download the code…
Tuesday, September 28, 2021 at 02:24pmHi Peter,
Thanks for bringing it up to us! I have re-uploaded the attachment and now you should get the sample code.
Duo