[Solved] Add signature to pdf with itext
Use itext pdfstamper to write the signature. FileOutputStream os = new FileOutputStream(destFileName); PdfStamper stamper = new PdfStamper(reader, os); Where reader is the sec file reader then once you have got the stamper. PdfPatternPainter painter = stamper.getOverContent(1).createPattern(200, 150); painter.setColorFill(BaseColor.ORANGE); painter.beginText(); painter.setTextMatrix(AffineTransform.getTranslateInstance(0, 50)); painter.setFontAndSize(BaseFont.createFont(), 70); painter.showText(waterMarkString); painter.endText(); for (int i = reader.getNumberOfPages(); i > 0; i–) { … Read more