PdfContentByte cb = writer.getDirectContent();
cb.saveState();
cb.concatCTM(1.0f, 0, 0, 1.0f, 36, 0);
float width = document.getPageSize().getWidth() - 20;
float height = document.getPageSize().getHeight() - 20;
Graphics2D g2 = cb.createGraphics(width, height);
//g2.rotate(Math.toRadians(-90), 100, 100);
PrintTranscoder prm = new PrintTranscoder();
TranscoderInput ti = new TranscoderInput(new StringReader(t));
prm.transcode(ti, null);
PageFormat pg = new PageFormat();