Class ParagraphSplitter

java.lang.Object
com.openhtmltopdf.bidi.ParagraphSplitter

public class ParagraphSplitter
extends Object
This class aims to split text into paragraphs where they can be passed to the BidiSplitter. Each text node in the document is attached to the closest block-like element which we assume paragraphs do not cross.
  • Constructor Details

    • ParagraphSplitter

      public ParagraphSplitter()
  • Method Details

    • convertDirectionIdent

      public static byte convertDirectionIdent​(IdentValue ident)
    • lookupParagraph

      public ParagraphSplitter.Paragraph lookupParagraph​(Text node)
      Get the paragraph object that a Text node is associated with. Should never return null.
    • lookupBlockElement

      public ParagraphSplitter.Paragraph lookupBlockElement​(Element elem)
    • splitRoot

      public void splitRoot​(LayoutContext c, Document doc)
      This starts everything by recursively dividing the document into paragraphs.
    • runBidiOnParagraphs

      public void runBidiOnParagraphs​(LayoutContext c)
      Run bidi splitting on the document's paragraphs.