public static class WordBreakers.NonBreakingWordBreaker extends Object implements WordBreaker
| Constructor and Description |
|---|
NonBreakingWordBreaker() |
| Modifier and Type | Method and Description |
|---|---|
Pair<String> |
breakWord(String word,
FontDescriptor fontDescriptor,
float maxWidth,
boolean breakHardIfNecessary)
Breaks the word in order to fit the given maximum width.
|
public Pair<String> breakWord(String word, FontDescriptor fontDescriptor, float maxWidth, boolean breakHardIfNecessary) throws IOException
WordBreakerbreakWord in interface WordBreakerword - the word to break.fontDescriptor - describing the font's type and size.maxWidth - the maximum width to obey.breakHardIfNecessary - indicates if the word should be broken hard to fit the width,
in case there is no suitable position for breaking it
adequately.null if it cannot be broken.IOException - by pdfboxCopyright © 2021. All rights reserved.