I'm using the Layout Parser in Document AI, but it doesn't seem to return bounding box details. Is there a way to retrieve these details from the API?
Currently, the response I receive looks like this:
{ "document": { "documentLayout": { "blocks": [ { "blockId": "1", "textBlock": { "text": "Firefox", "type": "header" }, "pageSpan": { "pageStart": 1, "pageEnd": 1 } } ] } } }
Hi @vguleria,
Welcome to Google Cloud Community!
Here's what you should look for:
You may try these approaches to fix your code:
Additionally, you may check these links:
I also found this case that you might find useful.
I hope the above information is helpful.
Hello friend, I also have the same problem as you. You have now solved the above problem. Can you please tell me how to fix them if you have solved them.
Has someone found solution to this original question?
It appears that you `returnBoundingBoxes` is exposed in `layoutConfig` but I'm still not seeing it in the return payload. `returnImages` is working as expected.
const request: protos.google.cloud.documentai.v1beta3.IProcessRequest = {
name,
rawDocument: {
content: documentContent,
mimeType,
},
processOptions: {
layoutConfig: {
returnBoundingBoxes: true, // not working
returnImages: true,
},
},
};
const [result] = await client.processDocument(request);
@ruthsekiAny ideas?
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |