Google Cloud Document Ai V1 Client - Class DocumentLayoutBlock (2.0.0)

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

Represents a block. A block could be one of the various types (text, table, list) supported.

Generated from protobuf message google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock

Namespace

Google \ Cloud \ DocumentAI \ V1 \ Document \ DocumentLayout

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ text_block Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock

Block consisting of text content.

↳ table_block Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock

Block consisting of table content/structure.

↳ list_block Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock

Block consisting of list content/structure.

↳ block_id string

ID of the block.

↳ page_span Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan

Page span of the block.

getTextBlock

Block consisting of text content.

Returns
Type Description
Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock|null

hasTextBlock

setTextBlock

Block consisting of text content.

Parameter
Name Description
var Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock
Returns
Type Description
$this

getTableBlock

Block consisting of table content/structure.

Returns
Type Description
Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock|null

hasTableBlock

setTableBlock

Block consisting of table content/structure.

Parameter
Name Description
var Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock
Returns
Type Description
$this

getListBlock

Block consisting of list content/structure.

Returns
Type Description
Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock|null

hasListBlock

setListBlock

Block consisting of list content/structure.

Parameter
Name Description
var Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock
Returns
Type Description
$this

getBlockId

ID of the block.

Returns
Type Description
string

setBlockId

ID of the block.

Parameter
Name Description
var string
Returns
Type Description
$this

getPageSpan

Page span of the block.

Returns
Type Description
Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan|null

hasPageSpan

clearPageSpan

setPageSpan

Page span of the block.

Parameter
Name Description
var Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan
Returns
Type Description
$this

getBlock

Returns
Type Description
string