Skip to content

Commit 4d55c3a

Browse files
committed
PDFBOX-6082: word should have more than 1 character
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1929041 13f79535-47bb-0310-9956-ffa450edef68
1 parent a088a1e commit 4d55c3a

File tree

1 file changed

+2
-1
lines changed
  • pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive

1 file changed

+2
-1
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/PlainText.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ public List<Line> getLines(PDFont font, float fontSize, float width) throws IOEx
200200
lineWidth = font.getStringWidth(word) * scale;
201201
}
202202

203-
if (wordWidth > width && textLine.getWords().isEmpty())
203+
if (word.length() > 1 && wordWidth > width && textLine.getWords().isEmpty())
204204
{
205205
// single word does not fit into width
206+
// PDFBOX-6082: at least 1 character
206207
wordNeedsSplit = true;
207208
while (true)
208209
{

0 commit comments

Comments
 (0)