I generate a PDF file with JAVA and jasper. Such jasper file is designed with iReport. Once the pdf file is created, I would like to place a signature with PdfStamper in a concrete position in the pdf. Possible solutions that I have found:
Use PdfSignatureAppearance.setVisibleSignature method. This does not fit my needs since it locates the signature in coordinates based position.
PdfStamper stp = PdfStamper.createSignature(reader, outStream, '\0', fileTmp);
PdfSignatureAppearance sap = stp.getSignatureAppearance();
sap.setVisibleSignature(new Rectangle(100, 100, 200, 200), 1, null);
Use PdfReader.getAcroFields() and then go through the AcroFields, get the coordinates of a predifined form field and insert the signature as shown in the previous option. The problem is that I am not able to define AcroFields with iReport, so I cannot use it either.
My question: is there any way to define fields with iReport and read after the PDF is created with Java?