# Google Cloud Document Ai V1 Client - Class Page (2.7.0)

2.7.0 (latest) 2.6.1 2.5.1 2.4.1 2.3.0 2.2.2 2.1.3 2.0.0 1.14.0 1.13.1 1.12.2 1.9.0 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.2 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Page.

A page in a [Document](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document).

Generated from protobuf message `google.cloud.documentai.v1.Document.Page`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1 \\ Document

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ page_number` | `int` 1-based index for current [Page](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page) in a parent [Document](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document). Useful when a page is taken out of a [Document](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document) for individual processing. |
| `↳ image` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Image` Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned. |
| `↳ transforms` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Matrix>` Transformation matrices that were applied to the original document image to produce [Page.image](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page#_Google_Cloud_DocumentAI_V1_Document_Page__getImage__). |
| `↳ dimension` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Dimension` Physical dimension of the page. |
| `↳ layout` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout` [Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout) for the page. |
| `↳ detected_languages` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.DetectedLanguage>` A list of detected languages together with confidence. |
| `↳ blocks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Block>` A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation. |
| `↳ paragraphs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Paragraph>` A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph. |
| `↳ lines` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Line>` A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line. |
| `↳ tokens` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Token>` A list of visually detected tokens on the page. |
| `↳ visual_elements` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.VisualElement>` A list of detected non-text visual elements, for example, checkbox, signature etc. on the page. |
| `↳ tables` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Table>` A list of visually detected tables on the page. |
| `↳ form_fields` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.FormField>` A list of visually detected form fields on the page. |
| `↳ symbols` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Symbol>` A list of visually detected symbols on the page. |
| `↳ detected_barcodes` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.DetectedBarcode>` A list of detected barcodes. |
| `↳ image_quality_scores` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.ImageQualityScores` Image quality scores. |
| `↳ provenance` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance` The history of this page. |

### getPageNumber

1-based index for current
[Page](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page) in a parent
[Document](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document). Useful when a page is
taken out of a [Document](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document) for
individual processing.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPageNumber

1-based index for current
[Page](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page) in a parent
[Document](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document). Useful when a page is
taken out of a [Document](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document) for
individual processing.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getImage

Rendered image for this page. This image is preprocessed to remove any
skew, rotation, and distortions such that the annotation bounding boxes
can be upright and axis-aligned.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Image|null` |   |

### hasImage

### clearImage

### setImage

Rendered image for this page. This image is preprocessed to remove any
skew, rotation, and distortions such that the annotation bounding boxes
can be upright and axis-aligned.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Image` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTransforms

Transformation matrices that were applied to the original document image
to produce [Page.image](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page#_Google_Cloud_DocumentAI_V1_Document_Page__getImage__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Matrix>` |   |

### setTransforms

Transformation matrices that were applied to the original document image
to produce [Page.image](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page#_Google_Cloud_DocumentAI_V1_Document_Page__getImage__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Matrix>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDimension

Physical dimension of the page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Dimension|null` |   |

### hasDimension

### clearDimension

### setDimension

Physical dimension of the page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Dimension` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLayout

[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout) for the page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout|null` |   |

### hasLayout

### clearLayout

### setLayout

[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout) for the page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDetectedLanguages

A list of detected languages together with confidence.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.DetectedLanguage>` |   |

### setDetectedLanguages

A list of detected languages together with confidence.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.DetectedLanguage>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBlocks

A list of visually detected text blocks on the page.

A block has a set of lines (collected into paragraphs) that have a common
line-spacing and orientation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Block>` |   |

### setBlocks

A list of visually detected text blocks on the page.

A block has a set of lines (collected into paragraphs) that have a common
line-spacing and orientation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Block>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getParagraphs

A list of visually detected text paragraphs on the page.

A collection of lines that a human would perceive as a paragraph.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Paragraph>` |   |

### setParagraphs

A list of visually detected text paragraphs on the page.

A collection of lines that a human would perceive as a paragraph.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Paragraph>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLines

A list of visually detected text lines on the page.

A collection of tokens that a human would perceive as a line.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Line>` |   |

### setLines

A list of visually detected text lines on the page.

A collection of tokens that a human would perceive as a line.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Line>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTokens

A list of visually detected tokens on the page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Token>` |   |

### setTokens

A list of visually detected tokens on the page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Token>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVisualElements

A list of detected non-text visual elements, for example, checkbox,
signature etc. on the page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.VisualElement>` |   |

### setVisualElements

A list of detected non-text visual elements, for example, checkbox,
signature etc. on the page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.VisualElement>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTables

A list of visually detected tables on the page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Table>` |   |

### setTables

A list of visually detected tables on the page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Table>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFormFields

A list of visually detected form fields on the page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.FormField>` |   |

### setFormFields

A list of visually detected form fields on the page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.FormField>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSymbols

A list of visually detected symbols on the page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Symbol>` |   |

### setSymbols

A list of visually detected symbols on the page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Symbol>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDetectedBarcodes

A list of detected barcodes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.DetectedBarcode>` |   |

### setDetectedBarcodes

A list of detected barcodes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.DetectedBarcode>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getImageQualityScores

Image quality scores.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.ImageQualityScores|null` |   |

### hasImageQualityScores

### clearImageQualityScores

### setImageQualityScores

Image quality scores.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.ImageQualityScores` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getProvenance

The history of this page.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance|null` |   |

### hasProvenance

### clearProvenance

### setProvenance

The history of this page.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |