Page Properties | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
The layout of the document describes the textual content of a document with positional information, based on the processed document.
Request
The layout of the document can be retrieved by a GET
request to the layout URI:
Headers
...
Header
...
Value
...
Accept
Headers
Header | Value |
---|---|
|
|
Code Block | ||
---|---|---|
| ||
//retrie a layout of the document GET /documents/{id}/layout Example curl -H 'Authorization: BEARER <token>' -X GET -H 'Accept: application/vnd.gini.v1+json |
...
'
-i https://pay-api.gini.net/documents/c292af40-d06a-11e2-9a2f-000000000000/layout |
Response
Headers
Status Code | Description |
---|---|
200 (OK) | Operation is successful. |
Header | Value |
---|---|
|
|
Body (application/vnd.gini.v1+json)
Key | Type | Description |
---|---|---|
|
| Array of page objects. |
Page object
Key | Type | Description |
---|---|---|
|
| Number of the page starting with 1. |
|
| Width of the page. |
|
| Height of the page. |
|
| Array of textzone objects. |
|
| Array of region objects. |
TextZone object
Key | Type | Description |
---|---|---|
|
| Array of paragraph objects. |
Paragraph object
Key | Type | Description |
---|---|---|
|
| Width of the paragraph. |
|
| Height of the paragraph. |
|
| Distance of the paragraph from the upper edge of the page. |
|
| Distance of the paragraph from the left edge of the page. |
|
| Array of line objects. |
Line object
Key | Type | Description |
---|---|---|
|
| Width of the line. |
|
| Height of the line. |
|
| Distance of the line from the upper edge of the page. |
|
| Distance of the line from the left edge of the page. |
|
| Array of word objects. |
Word object
Key | Type | Description |
---|---|---|
|
| Height of the word. |
|
| Width of the word. |
|
| Distance of the word from the left edge of the page. |
|
| Distance of the word from the upper edge of the page. |
|
| Font size of the word in points. |
|
| Name of the font family of the word. |
|
| Indicates bold font style. |
|
| Text of word. |
Region object
Key | Type | Description |
---|---|---|
|
| Height of the region of interest. |
|
| Width of the region of interest. |
|
| Distance of the region from the left edge of the page. |
|
| Distance of the region from the upper edge of the page. |
|
| Type of the region of interest, |
for example, RemittanceSlip. |
Errors
Status Code | Description |
---|---|
404 (Not Found) | The requested layout is invalid. |
Code Block | ||
---|---|---|
| ||
//layout example { "pages": [ { "number": 1, "sizeX": 595.3, "sizeY": 841.9, "textZones": [ { "paragraphs": [ { "l": 54.0, "t": 158.76, "w": 190.1, "h": 36.55000000000001, "lines": [ { "l": 54.0, "t": 158.76, "w": 190.1, "h": 10.810000000000002, "wds": [ { "l": 54.0, "t": 158.76, "w": 18.129999999999995, "h": 9.900000000000006, "fontSize": 9.9, "fontFamily": "Arial-BoldMT", "bold":false, "text": "Ihre" }, { "l": 74.86, "t": 158.76, "w": 83.91000000000001, "h": 9.900000000000006, "fontSize": 9.9, "fontFamily": "Arial-BoldMT", "bold":false, "text": "Vorgangsnummer" }, { "l": 158.76, "t": 158.76, "w": 3.3000000000000114, "h": 9.900000000000006, "fontSize": 9.9, "fontFamily": "Arial-BoldMT", "bold":false, "text": ":" }, [...] ] }, [...] ] } ] } ], "regions": [ { "l": 20.0, "t": 240.1, "w": 190.0, "h": 150.3, "type": "RemittanceSlip" }, [...] ] }, [...] ] } |