Bug 203576 NullPointerException when preview report in PDF
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFTextLM.java
int last = 0;
			int current = 0;
			for (int i = startIndex + 1; i < hyphenation.length(); i++) 
			{
				last = current;
				String pre = hyphenation.getHyphenText(startIndex, i);
				current = (int)(fi.getWordWidth(pre) * PDFConstants.LAYOUT_TO_PDF_RATIO) 
					+letterSpacing * pre.length();
				if (width > last && width <= current) 
				{
					return i-1;
				}
			}
			return hyphenation.length() - 1;
		}
		
		/**
		 * Gets the reverse text if the run direction is RtL,
		 * If the run direction is LtR, the text keeps the same.
		 * @param text						the original text.
		 * @return							the reverse text.
		 */
		private String getReverseText(String text)
		{
			if (chunk.getRunDirection() == Bidi.DIRECTION_LEFT_TO_RIGHT)
			{
				return text;
			}
			else
			{