Csv { void applyCsv(final PdfStamper stamper) throws IOException { final TextField tf = new TextField( stamper.getWriter(), new Rectangle( this.positionOnPageLowerLeftX, this.positionOnPageLowerLeftY, this.positionOnPageUpperRightX, this.positionOnPageUpperRightY ), "CSV" ); tf.setRotation(this.rotation); tf.setText(this.text); tf.setFontSize(this.fontSize); try { stamper.addAnnotation(tf.getTextField(), this.page); } catch (final Exception e) { throw new IOException(e); } } Csv();  Csv(final int pg,
			   final String txt,
			   final float fontSz,
			   final int r,
			   final int llx,
			   final int lly,
			   final int urx,
			   final int ury);  static int LAST_PAGE; static int ALL_PAGES; }
@SuppressWarnings("static-method") @Test public void testCsvInsertion() throws Exception { final PdfReader reader = new PdfReader( AOUtil.getDataFromInputStream( ClassLoader.getSystemResourceAsStream("TEST_PDF.pdf") ) ); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final Calendar globalDate = new GregorianCalendar(); final PdfStamper stamper = new PdfStamper(reader, baos, globalDate); final Csv csv = new Csv(1, "TEXTO DEL CSV", 40, 180, 0, 0, 1000, 1000); csv.applyCsv(stamper); stamper.close(globalDate); reader.close(); final File tmpFile = File.createTempFile("TESTCSV_", ".pdf"); final OutputStream fos = new FileOutputStream(tmpFile); fos.write(baos.toByteArray()); fos.flush(); fos.close(); }