0

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.

  • You are using iText version 2.1.7 or older. The first thing you need to do, is try again with either iText 5.5.12 or iText 7.0.4, and report your result. If you then still have this issue, then people will be able to help you. But with iText 2.1.7, you cannot hope for any help because that version is just too old. – Amedee Van Gasse Sep 27 '17 at 07:34
  • You can't. The best you'll be able to do is countersign the document with the new data added. The signature technology was designed to detect changes made to the file after signing. If the document had a certifying signature, you can add data to fields but only if the document is set up to allow that and even then, you have to be very careful about what changes are made to the document and you need to do an append save. – joelgeraci Sep 27 '17 at 15:43
  • I don't exactly understand your use case. Do you require one final change *after* signing? – mkl Sep 27 '17 at 17:43

0 Answers0