Class DefaultLineBuilderStrategy
- java.lang.Object
-
- org.apache.camel.component.pdf.text.DefaultLineBuilderStrategy
-
- All Implemented Interfaces:
LineBuilderStrategy
public class DefaultLineBuilderStrategy extends Object implements LineBuilderStrategy
Builds lines from words based on line width and PDF document page size. Built lines then will be written to pdf document.
-
-
Constructor Summary
Constructors Constructor Description DefaultLineBuilderStrategy(PdfConfiguration pdfConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
buildLines(Collection<String> splittedText)
Builds lines from words.float
getAllowedLineWidth()
-
-
-
Constructor Detail
-
DefaultLineBuilderStrategy
public DefaultLineBuilderStrategy(PdfConfiguration pdfConfiguration)
-
-
Method Detail
-
buildLines
public Collection<String> buildLines(Collection<String> splittedText) throws IOException
Builds lines from words. Utilizes the same behaviour as office software:- If word doesn't fit in current line, and current lines contains other words, then it will be moved to new line.
- Word doesn't fit in the line and line does not contain other words, then word will be slitted, and split index will be on max amount of characters that fits in the line
- Specified by:
buildLines
in interfaceLineBuilderStrategy
- Throws:
IOException
-
getAllowedLineWidth
public float getAllowedLineWidth()
-
-