You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2025/10/10 07:29:53 UTC
svn commit: r1929042 - pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form
Author: tilman
Date: Fri Oct 10 07:29:53 2025
New Revision: 1929042
Log:
PDFBOX-6082: word should have more than 1 character
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PlainText.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PlainText.java
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PlainText.java Fri Oct 10 07:29:49 2025 (r1929041)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PlainText.java Fri Oct 10 07:29:53 2025 (r1929042)
@@ -205,9 +205,10 @@ class PlainText
lineWidth = font.getStringWidth(word) * scale;
}
- if (wordWidth > width && textLine.getWords().isEmpty())
+ if (word.length() > 1 && wordWidth > width && textLine.getWords().isEmpty())
{
// single word does not fit into width
+ // PDFBOX-6082: at least 1 character
wordNeedsSplit = true;
while (true)
{