Google Cloud Document AI processing response impossible to get Form Fields in PHP

444 Views Asked by At

I cannot get form fields values from processing a response in PHP when using a Google Cloud Document AI with a custom processor where the form fields are defined. google-cloud only has documentation for Java, C#, Pyton... How can I get my data? When I tested it in googe-cloud then everything worked...

fields

code

I try to looping over pages en so trying to get formFields but nothing works.

1

There are 1 best solutions below

0
On

Custom Document Extractor returns the extracted data in the entities field, not formFields.

The Form Parser Processor is currently the only processor that populates the formFields field.


You can use this example to follow the logic for how to handle the response for Entity Extraction processors.

https://cloud.google.com/document-ai/docs/handle-response#entities_nested_entities_and_normalized_values