Class PlainText
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.interactive.annotation.layout.PlainText
-
public class PlainText extends java.lang.Object
A block of text.A block of text can contain multiple paragraphs which will be treated individually within the block placement.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PlainText.Line
An individual line of text.(package private) static class
PlainText.Paragraph
A block of text to be formatted as a whole.(package private) static class
PlainText.TextAttribute
Attribute keys and attribute values used for text handling.(package private) static class
PlainText.Word
An individual word.
-
Field Summary
Fields Modifier and Type Field Description private static float
FONTSCALE
private java.util.List<PlainText.Paragraph>
paragraphs
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.util.List<PlainText.Paragraph>
getParagraphs()
Get the list of paragraphs.
-
-
-
Field Detail
-
FONTSCALE
private static final float FONTSCALE
- See Also:
- Constant Field Values
-
paragraphs
private final java.util.List<PlainText.Paragraph> paragraphs
-
-
Constructor Detail
-
PlainText
public PlainText(java.lang.String textValue)
Construct the text block from a single value. Constructs the text block from a single value splitting into individualPlainText.Paragraph
when a new line character is encountered.- Parameters:
textValue
- the text block string.
-
PlainText
public PlainText(java.util.List<java.lang.String> listValue)
Construct the text block from a list of values. Constructs the text block from a list of values treating each entry as an individualPlainText.Paragraph
.- Parameters:
listValue
- the text block string.
-
-
Method Detail
-
getParagraphs
java.util.List<PlainText.Paragraph> getParagraphs()
Get the list of paragraphs.- Returns:
- the paragraphs.
-
-