Class PlainText.Paragraph

java.lang.Object
org.apache.pdfbox.pdmodel.interactive.annotation.layout.PlainText.Paragraph
Enclosing class:
PlainText

static class PlainText.Paragraph extends Object
A block of text to be formatted as a whole.

A block of text can contain multiple paragraphs which will be treated individually within the block placement.

  • Field Details

    • textContent

      private final String textContent
  • Constructor Details

    • Paragraph

      Paragraph(String text)
  • Method Details

    • getText

      String getText()
      Get the paragraph text.
      Returns:
      the text.
    • getLines

      List<PlainText.Line> getLines(PDFont font, float fontSize, float width) throws IOException
      Break the paragraph into individual lines.
      Parameters:
      font - the font used for rendering the text.
      fontSize - the fontSize used for rendering the text.
      width - the width of the box holding the content.
      Returns:
      the individual lines.
      Throws:
      IOException