Document Ingestion API can be used to detect signatures and return their bounding boxes.Signature detection incurs additional costs, so please refer to the pricing page for more details.
Bounding boxes of signatures can be detected by setting signature_detection to true in the parse_options JSON object when calling the parse API.
Copy
Ask AI
from tensorlake.documentai import ( DocumentAI, ParsingOptions,)doc_ai = DocumentAI(api_key="YOUR_API_KEY")parsing_options = ParsingOptions( signature_detection=True,)parse_id = doc_ai.parse( file="file_XXX", # Replace with your file ID or URL parsing_options=parsing_options,)
The bounding boxes of signatures are present in the Document object returned by the parse API.
Copy
Ask AI
parsed_result = doc_ai.wait_for_completion(parse_id=parse_id)# There is a signature on page 10 of this documentsignature_fragment result.outputs.document.pages[10].page_fragments[0]# PageFragment(fragment_type=<PageFragmentType.SIGNATURE: 'signature'>, content=Text(content='Signature detected'), reading_order=-1, page_number=None, bbox={'x1': 79.0, 'x2': 200.0, 'y1': 812.0, 'y2': 855.0})