Paragraphs

Overview

Paragraphs is a class in Aspose.Pdf FOSS for Java. Inherits from: Iterable<BaseParagraph>.

Represents an ordered collection of {@link BaseParagraph} elements that make up the content of a page, cell, or other container.

Properties

NameTypeAccessDescription
countintReadReturns the number of paragraphs in this collection.
emptybooleanReadReturns whether this collection contains no paragraphs.

Methods

SignatureDescription
Paragraphs()Creates an empty Paragraphs collection.
add(paragraph: BaseParagraph)Adds a paragraph to the end of this collection.
add(text: String)Convenience method that creates a {@link TextFragment} from the given text
and adds it to this collection.
get(index: int)BaseParagraphReturns the paragraph at the specified index.
size()intReturns the number of paragraphs in this collection.
getCount()intReturns the number of paragraphs in this collection.
remove(index: int)BaseParagraphRemoves the paragraph at the specified index.
clear()Removes all paragraphs from this collection.
isEmpty()booleanReturns whether this collection contains no paragraphs.
iterator()Iterator<BaseParagraph>Returns an iterator over the paragraphs in this collection.

See Also