Class PDFText
- java.lang.Object
-
- com.cloudofficeprint.RenderElements.PDF.PDFInsertObject
-
- com.cloudofficeprint.RenderElements.PDF.PDFText
-
public class PDFText extends PDFInsertObject
-
-
Constructor Summary
Constructors Constructor Description PDFText(java.lang.Integer x, java.lang.Integer y, java.lang.Integer pageNumber, java.lang.String text)
Represents text to insert in a PDF.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getBold()
java.lang.String
getFont()
java.lang.String
getFontColor()
java.lang.Integer
getFontSize()
java.lang.String
getIdentifier()
java.lang.Boolean
getItalic()
com.google.gson.JsonObject
getJson()
java.lang.Integer
getRotation()
java.lang.String
getText()
void
setBold(java.lang.Boolean bold)
void
setFont(java.lang.String font)
void
setFontColor(java.lang.String fontColor)
void
setFontSize(java.lang.Integer fontSize)
void
setItalic(java.lang.Boolean italic)
void
setRotation(java.lang.Integer rotation)
void
setText(java.lang.String text)
-
Methods inherited from class com.cloudofficeprint.RenderElements.PDF.PDFInsertObject
getPageNumber, getX, getY, setPageNumber, setX, setY
-
-
-
-
Constructor Detail
-
PDFText
public PDFText(java.lang.Integer x, java.lang.Integer y, java.lang.Integer pageNumber, java.lang.String text)
Represents text to insert in a PDF. The text options can be set with the setter functions.- Parameters:
x
- X-coordinate of the position of the text in the template starting from bottom left.y
- Y-coordinate of the position of the text in the template starting from bottom left.pageNumber
- Page number of the page where the text should be inserted. -1 if the text should be displayed on all pages.text
- Text that should be inserted.
-
-
Method Detail
-
getText
public java.lang.String getText()
- Returns:
- Text to be inserted in the PDF.
-
setText
public void setText(java.lang.String text)
- Parameters:
text
- Text to be inserted in the PDF.
-
getRotation
public java.lang.Integer getRotation()
- Returns:
- Rotation of the text in degrees.
-
setRotation
public void setRotation(java.lang.Integer rotation)
- Parameters:
rotation
- Rotation of the text in degrees.
-
getBold
public java.lang.Boolean getBold()
- Returns:
- Whether the text should be in bold.
-
setBold
public void setBold(java.lang.Boolean bold)
- Parameters:
bold
- Whether the text should be in bold.
-
getItalic
public java.lang.Boolean getItalic()
- Returns:
- Whether the text shoud be in italic.
-
setItalic
public void setItalic(java.lang.Boolean italic)
- Parameters:
italic
- Whether the text should be in italic.
-
getFont
public java.lang.String getFont()
- Returns:
- Font of the text.
-
setFont
public void setFont(java.lang.String font)
- Parameters:
font
- Font of the text.
-
getFontColor
public java.lang.String getFontColor()
- Returns:
- Color of the text in CSS format.
-
setFontColor
public void setFontColor(java.lang.String fontColor)
- Parameters:
fontColor
- Color of the text in CSS format.
-
getFontSize
public java.lang.Integer getFontSize()
- Returns:
- Size of the font.
-
setFontSize
public void setFontSize(java.lang.Integer fontSize)
- Parameters:
fontSize
- Size of the font.
-
getJson
public com.google.gson.JsonObject getJson()
- Specified by:
getJson
in classPDFInsertObject
- Returns:
- JSONObject with the tags for this element for the Cloud Office Print server.
-
getIdentifier
public java.lang.String getIdentifier()
- Specified by:
getIdentifier
in classPDFInsertObject
- Returns:
- Identifier for the JSON.
-
-