The problem is located in this block in LineArea.java. the doHyphenation will return 0, and the if statement is entered because there was not enough room for the hyphenated word, and addWord will return 0, because itβs the beginning of the word and it will start all over. A workaround is to prevent the column size can be smaller then the size of a single character if (this.wrapOption == WrapOption.WRAP) { if (hyphProps.hyphenate == Hyphenate.TRUE) { int ret = wordStart; ret = this.doHyphenation(data, i, wordStart, this.getContentWidth() - (finalWidth + spaceWidth + pendingWidth), finalWidth + spaceWidth + embeddedLinkStart, ls, textState); // current word couldn't be hypenated // couldn't fit first word // I am at the beginning of my line if ((ret == wordStart) && (wordStart == start) && (finalWidth == 0)) { MessageHandler.log("area contents overflows" + " area in line " + getLineText()); addSpacedWord(new String(data, wordStart, wordLength - 1), ls, embeddedLinkStart, spaceWidth, textState, false); finalWidth += wordWidth; wordWidth = 0; ret = i; } return ret; } else if (wordStart == start) { // first word overrun = true; // if not at start of line, return word start // to try again on a new line if (finalWidth > 0) { return wordStart; } } else { return wordStart; } } }
Thank you for your problem report and for documenting a workaround. Development including patches and bugfixes for 0.20.5 have been frozen. Feel free to check if the problem exists in the current beta version of Fop (0.91) and re-open the issues in that case.
batch transition to closed remaining pre-FOP1.0 resolved bugs