I create a pdf document and specify few acro-fields. These acro-fields used to be filled by java itext library. This document is digitally signed after adding all required acro-fields.
We already set form filling property in digital signature but we have requirement to fill these acro-fields and make them read only after one time filling without invalidating digital signature. Here is the code that I am using to fill this document -
String FILE = "/Users/xyz/Desktop/test1.pdf";
PdfReader reader = new PdfReader(pdfReader, new FileOutputStream(pdfTemplatePath), '\0', true);
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(FILE), );
AcroFields form = stamper.getAcroFields();
form.setField("Name", "test 123");
stamper.close();
reader.close();
I am using lowagie itext library for filling pdf form.
Is there any way to fix this issue. Thanks.