Skip to content
Reference > Classes

PdfText

Definition

PdfText var = .... ;

Extends

Extended By

None

Description

Text for display in PdfBuilder

Method Summary

Owner Name Return Type Description
PdfText appendText(text) Object append text to the pdf
Object getClassName() String Returns the string name of this object's class type.
PdfText getFont() String get current font for use with text
PdfText getHorizontalAlignment() String get current alignment (either: LEFT, CENTER, RIGHT)
PdfText getLineSpacing() Number get line spacing in inches
PdfText getSpacingAfter() Number get spacing after paragraphs, tables, images in inches
PdfText getSpacingBefore() Number get spacing before paragraphs, tables, images in inches
PdfText getSubscript() Float get the text lower amount
PdfText getSuperscript() Float get the text rise
PdfText setFont(font) Object set current font for use with text. Families include: Courier, Helvetica, Times-Roman, Symbol, ZapfDingbats. Styles include: Bold, Italic, Underline, Line-through
PdfText setHorizontalAlignment(alignment) Object set current alignment, note this will create a line break if a paragraph is in progress
PdfText setLineSpacing(lineSpacingInches) Object Set the spacing between each line of text within a paragraph
PdfText setSubscript(textLowerPercent) Object set the percent lower of the text, zero to set to no rise
PdfText setSuperscript(textRisePercent) Object set the percent rise of the text, zero to set to no rise
Object toJson() String Returns a json representation of this object.

Method Definitions


appendText(text)

Object PdfText::appendText(String text)

Description

append text to the pdf

Parameter Definition

Name Type Description
text String 

getFont()

String PdfText::getFont()

Description

get current font for use with text


getHorizontalAlignment()

String PdfText::getHorizontalAlignment()

Description

get current alignment (either: LEFT, CENTER, RIGHT)


getLineSpacing()

Number PdfText::getLineSpacing()

Description

get line spacing in inches


getSpacingAfter()

Number PdfText::getSpacingAfter()

Description

get spacing after paragraphs, tables, images in inches


getSpacingBefore()

Number PdfText::getSpacingBefore()

Description

get spacing before paragraphs, tables, images in inches


getSubscript()

Float PdfText::getSubscript()

Description

get the text lower amount


getSuperscript()

Float PdfText::getSuperscript()

Description

get the text rise


setFont(font)

Object PdfText::setFont(String font)

Description

set current font for use with text. Families include: Courier, Helvetica, Times-Roman, Symbol, ZapfDingbats. Styles include: Bold, Italic, Underline, Line-through

Parameter Definition

Name Type Description
font String  any combination of size (in inches),family,color,style, ex: 15 Helvetica bold intalic #FF0000

setHorizontalAlignment(alignment)

Object PdfText::setHorizontalAlignment(String alignment)

Description

set current alignment, note this will create a line break if a paragraph is in progress

Parameter Definition

Name Type Description
alignment String  either: LEFT, CENTER, RIGHT

setLineSpacing(lineSpacingInches)

Object PdfText::setLineSpacing(Number lineSpacingInches)

Description

Set the spacing between each line of text within a paragraph

Parameter Definition

Name Type Description
lineSpacingInches Number  Spacing in inches between lines (plus height of font)

setSubscript(textLowerPercent)

Object PdfText::setSubscript(Number textLowerPercent)

Description

set the percent lower of the text, zero to set to no rise

Parameter Definition

Name Type Description
textLowerPercent Number  The percent to lower (valid range is 0.0 - 1.0), .3 is a good suggestion

setSuperscript(textRisePercent)

Object PdfText::setSuperscript(Number textRisePercent)

Description

set the percent rise of the text, zero to set to no rise

Parameter Definition

Name Type Description
textRisePercent Number  The percent to raise (valid range is 0.0 - 1.0), .3 is a good suggestion