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

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

Annotation for common text style attributes. This adheres to CSS conventions as much as possible.

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ text_anchor Google\Cloud\DocumentAI\V1\Document\TextAnchor

Text anchor indexing into the Document.text.

↳ color Google\Type\Color

Text color.

↳ background_color Google\Type\Color

Text background color.

↳ font_weight string

Font weight. Possible values are normal, bold, bolder, and lighter. https://www.w3schools.com/cssref/pr_font_weight.asp

↳ text_style string

Text style. Possible values are normal, italic, and oblique. https://www.w3schools.com/cssref/pr_font_font-style.asp

↳ text_decoration string

Text decoration. Follows CSS standard.

↳ font_size Google\Cloud\DocumentAI\V1\Document\Style\FontSize

Font size.

↳ font_family string

Font family such as Arial, Times New Roman. https://www.w3schools.com/cssref/pr_font_font-family.asp

getTextAnchor

Text anchor indexing into the Document.text.

Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

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

hasTextAnchor

clearTextAnchor

setTextAnchor

Text anchor indexing into the Document.text.

Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

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

getColor

Text color.

Generated from protobuf field .google.type.Color color = 2;

Returns
TypeDescription
Google\Type\Color|null

hasColor

clearColor

setColor

Text color.

Generated from protobuf field .google.type.Color color = 2;

Parameter
NameDescription
var Google\Type\Color
Returns
TypeDescription
$this

getBackgroundColor

Text background color.

Generated from protobuf field .google.type.Color background_color = 3;

Returns
TypeDescription
Google\Type\Color|null

hasBackgroundColor

clearBackgroundColor

setBackgroundColor

Text background color.

Generated from protobuf field .google.type.Color background_color = 3;

Parameter
NameDescription
var Google\Type\Color
Returns
TypeDescription
$this

getFontWeight

Font weight. Possible values are normal, bold, bolder, and lighter.

https://www.w3schools.com/cssref/pr_font_weight.asp

Generated from protobuf field string font_weight = 4;

Returns
TypeDescription
string

setFontWeight

Font weight. Possible values are normal, bold, bolder, and lighter.

https://www.w3schools.com/cssref/pr_font_weight.asp

Generated from protobuf field string font_weight = 4;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTextStyle

Text style. Possible values are normal, italic, and oblique.

https://www.w3schools.com/cssref/pr_font_font-style.asp

Generated from protobuf field string text_style = 5;

Returns
TypeDescription
string

setTextStyle

Text style. Possible values are normal, italic, and oblique.

https://www.w3schools.com/cssref/pr_font_font-style.asp

Generated from protobuf field string text_style = 5;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTextDecoration

Text decoration. Follows CSS standard.

Generated from protobuf field string text_decoration = 6;

Returns
TypeDescription
string

setTextDecoration

Text decoration. Follows CSS standard.

Generated from protobuf field string text_decoration = 6;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getFontSize

Font size.

Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\Style\FontSize|null

hasFontSize

clearFontSize

setFontSize

Font size.

Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

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

getFontFamily

Font family such as Arial, Times New Roman.

https://www.w3schools.com/cssref/pr_font_font-family.asp

Generated from protobuf field string font_family = 8;

Returns
TypeDescription
string

setFontFamily

Font family such as Arial, Times New Roman.

https://www.w3schools.com/cssref/pr_font_font-family.asp

Generated from protobuf field string font_family = 8;

Parameter
NameDescription
var string
Returns
TypeDescription
$this