private static PrinterResolution extractFromResolutionString(String buffer) {
		if (buffer != null && buffer.length() > 0) {
			int sep = buffer.indexOf('x');
			int x;
			int y;

			if (sep != -1 && sep < buffer.length() - 1) {
				x = Numbers.getInteger(buffer.substring(0, sep), 0);
				y = Numbers.getInteger(buffer.substring(sep + 1), 0);
			} else {
				x = Numbers.getInteger(buffer, 0);
				y = x;
			}
			if (x < 1 || y < 1) {
				return null;
			}
			return new PrinterResolution(x, y, 1);
		}
		return null;
	}