if (paintY + lineHeight > clientArea.y + clientArea.height) { printer.endPage(); printer.startPage(); paintY = clientArea.y;
if (paintY == clientArea.y) { startPage(page);
	void print() {		StyledTextContent content = renderer.getContent();		FontData printerFontData = gc.getFont().getFontData()[0];		Color background = gc.getBackground();		Color foreground = gc.getForeground();		int lineHeight = renderer.getLineHeight();		int lineCount = content.getLineCount();		int paintY = clientArea.y;				if (singleLine) {			lineCount = 1;		}		if (startPage == 1) {			printer.startPage();		}					for (int i = startLine; i < lineCount && i < endLine; i++, paintY += lineHeight) {			String line = content.getLine(i);						if (paintY + lineHeight > clientArea.y + clientArea.height) {				printer.endPage();				printer.startPage();				paintY = clientArea.y;			}			renderer.drawLine(				line, i, paintY, gc, background, foreground, printerFontData, true);		}		if (paintY > clientArea.y && paintY <= clientArea.y + clientArea.height) {			printer.endPage();		}	}	