Google Cloud Document Ai V1 Client - Class Page (1.0.1)

Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Page.

A page in a Document.

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ page_number int

1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.

↳ image Google\Cloud\DocumentAI\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<Google\Cloud\DocumentAI\V1\Document\Page\Matrix>

Transformation matrices that were applied to the original document image to produce Page.image.

↳ dimension Google\Cloud\DocumentAI\V1\Document\Page\Dimension

Physical dimension of the page.

↳ layout Google\Cloud\DocumentAI\V1\Document\Page\Layout

Layout for the page.

↳ detected_languages array<Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>

A list of detected languages together with confidence.

↳ blocks array<Google\Cloud\DocumentAI\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<Google\Cloud\DocumentAI\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<Google\Cloud\DocumentAI\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<Google\Cloud\DocumentAI\V1\Document\Page\Token>

A list of visually detected tokens on the page.

↳ visual_elements array<Google\Cloud\DocumentAI\V1\Document\Page\VisualElement>

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

↳ tables array<Google\Cloud\DocumentAI\V1\Document\Page\Table>

A list of visually detected tables on the page.

↳ form_fields array<Google\Cloud\DocumentAI\V1\Document\Page\FormField>

A list of visually detected form fields on the page.

↳ symbols array<Google\Cloud\DocumentAI\V1\Document\Page\Symbol>

A list of visually detected symbols on the page.

↳ detected_barcodes array<Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode>

A list of detected barcodes.

↳ image_quality_scores Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores

Image Quality Scores.

↳ provenance Google\Cloud\DocumentAI\V1\Document\Provenance

The history of this page.

getPageNumber

1-based index for current Page in a parent Document.

Useful when a page is taken out of a Document for individual processing.

Generated from protobuf field int32 page_number = 1;

Returns
TypeDescription
int

setPageNumber

1-based index for current Page in a parent Document.

Useful when a page is taken out of a Document for individual processing.

Generated from protobuf field int32 page_number = 1;

Parameter
NameDescription
var int
Returns
TypeDescription
$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.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13;

Returns
TypeDescription
Google\Cloud\DocumentAI\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.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13;

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\Page\Image
Returns
TypeDescription
$this

getTransforms

Transformation matrices that were applied to the original document image to produce Page.image.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTransforms

Transformation matrices that were applied to the original document image to produce Page.image.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\Matrix>
Returns
TypeDescription
$this

getDimension

Physical dimension of the page.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2;

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\Page\Dimension|null

hasDimension

clearDimension

setDimension

Physical dimension of the page.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2;

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\Page\Dimension
Returns
TypeDescription
$this

getLayout

Layout for the page.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3;

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\Page\Layout|null

hasLayout

clearLayout

setLayout

Layout for the page.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3;

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\Page\Layout
Returns
TypeDescription
$this

getDetectedLanguages

A list of detected languages together with confidence.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDetectedLanguages

A list of detected languages together with confidence.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>
Returns
TypeDescription
$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.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

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.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\Block>
Returns
TypeDescription
$this

getParagraphs

A list of visually detected text paragraphs on the page.

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

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setParagraphs

A list of visually detected text paragraphs on the page.

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

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\Paragraph>
Returns
TypeDescription
$this

getLines

A list of visually detected text lines on the page.

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

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLines

A list of visually detected text lines on the page.

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

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\Line>
Returns
TypeDescription
$this

getTokens

A list of visually detected tokens on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTokens

A list of visually detected tokens on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\Token>
Returns
TypeDescription
$this

getVisualElements

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

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setVisualElements

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

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\VisualElement>
Returns
TypeDescription
$this

getTables

A list of visually detected tables on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTables

A list of visually detected tables on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\Table>
Returns
TypeDescription
$this

getFormFields

A list of visually detected form fields on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setFormFields

A list of visually detected form fields on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\FormField>
Returns
TypeDescription
$this

getSymbols

A list of visually detected symbols on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setSymbols

A list of visually detected symbols on the page.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\Symbol>
Returns
TypeDescription
$this

getDetectedBarcodes

A list of detected barcodes.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDetectedBarcodes

A list of detected barcodes.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15;

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode>
Returns
TypeDescription
$this

getImageQualityScores

Image Quality Scores.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17;

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores|null

hasImageQualityScores

clearImageQualityScores

setImageQualityScores

Image Quality Scores.

Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17;

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores
Returns
TypeDescription
$this

getProvenance

The history of this page.

Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true];

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\Provenance|null

hasProvenance

clearProvenance

setProvenance

The history of this page.

Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true];

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\Provenance
Returns
TypeDescription
$this