public String addTitleEps(String eps) throws IOException {
		if (text == null || text.size() == 0) {
			return eps;
		}

		final int idx = eps.indexOf("%%BoundingBox:");
		if (idx == -1) {
			throw new IllegalArgumentException();
		}
		final StringTokenizer st = new StringTokenizer(eps.substring(idx + "%%BoundingBox:".length()), " \n\t\r");
		final int x1 = Integer.parseInt(st.nextToken());
		final int y1 = Integer.parseInt(st.nextToken());
		final int x2 = Integer.parseInt(st.nextToken());
		final int y2 = Integer.parseInt(st.nextToken());
		assert x2 >= x1;
		assert y2 >= y1;

		final double width = x2 - x1;
		final double height = y2 - y1;

		final UGraphicEps uGraphicEps = new UGraphicEps(colorMapper, epsStrategy);
		final Dimension2D dimText = textBloc.calculateDimension(uGraphicEps.getStringBounder());
		final double xpos;

		if (horizontalAlignment == HorizontalAlignment.LEFT) {
			xpos = 2;
		} else if (horizontalAlignment == HorizontalAlignment.RIGHT) {
			xpos = width - dimText.getWidth() - 2;
		} else if (horizontalAlignment == HorizontalAlignment.CENTER) {
			xpos = (width - dimText.getWidth()) / 2;
		} else {
			xpos = 0;
			assert false;
		}

		final double yText;

		if (verticalPosition == VerticalPosition.TOP) {
			yText = 0;
		} else {
			yText = height + margin;
		}

		textBloc.drawU(uGraphicEps.apply(new UTranslate(xpos, yText)));

		final double yImage;
		if (verticalPosition == VerticalPosition.TOP) {
			yImage = dimText.getHeight();
		} else {
			yImage = 0;
		}

		uGraphicEps.drawEps(eps, 0, yImage);

		uGraphicEps.close();
		return uGraphicEps.getEPSCode();

	}