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

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 DocumentLayoutBlock\LayoutTextBlock

Block consisting of text content.

↳ table_block DocumentLayoutBlock\LayoutTableBlock

Block consisting of table content/structure.

↳ list_block DocumentLayoutBlock\LayoutListBlock

Block consisting of list content/structure.

↳ block_id string

ID of the block.

↳ page_span DocumentLayoutBlock\LayoutPageSpan

Page span of the block.

getTextBlock

Block consisting of text content.

Returns
Type Description
DocumentLayoutBlock\LayoutTextBlock|null

hasTextBlock

setTextBlock

Block consisting of text content.

Parameter
Name Description
var DocumentLayoutBlock\LayoutTextBlock
Returns
Type Description
$this

getTableBlock

Block consisting of table content/structure.

Returns
Type Description
DocumentLayoutBlock\LayoutTableBlock|null

hasTableBlock

setTableBlock

Block consisting of table content/structure.

Parameter
Name Description
var DocumentLayoutBlock\LayoutTableBlock
Returns
Type Description
$this

getListBlock

Block consisting of list content/structure.

Returns
Type Description
DocumentLayoutBlock\LayoutListBlock|null

hasListBlock

setListBlock

Block consisting of list content/structure.

Parameter
Name Description
var 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
DocumentLayoutBlock\LayoutPageSpan|null

hasPageSpan

clearPageSpan

setPageSpan

Page span of the block.

Parameter
Name Description
var DocumentLayoutBlock\LayoutPageSpan
Returns
Type Description
$this

getBlock

Returns
Type Description
string