Sorry. When i do saveIncremental, the signature is valid but the form field value is not changed. If I do save, the fiedvalue is correct, but the signatures fail.
On Tue, May 26, 2015 at 6:09 PM, Maruan Sahyoun <[email protected]> wrote: > Hi, > > > Am 26.05.2015 um 12:54 schrieb Suma Rani <[email protected]>: > > > > Hello, > > > > I am trying to change a form after signing. The flow is like this: > > 1. add a form to the existing document > > 2. Fill some of the fields and sign it > > 3. Change the above fields/ fill some other fields and sign it again. > > > > 1 and 2 are done. no problem with that. But the signature becomes invalid > > when I do the 3rd. > > what do you mean by invalid. Is it that you get a warning sign in Adobe > Reader or Acrobat? Or is it that the signature is corrupt …. > > BR > Maruan > > > Both signatures are invisible and my first signature > > allows form fill-in. NO problem when i edit it with adobe reader. This is > > the code I am using for the part 3. > > > > PDSignature signature = new PDSignature(); > > signature.setFilter(PDSignature.FILTER_ADOBE_PPKLITE); > > signature.setSubFilter(PDSignature.SUBFILTER_ADBE_PKCS7_DETACHED); > > signature.setReason("Signing second time"); > > signature.setSignDate(Calendar.getInstance()); > > > > PDAcroForm acroForm = doc.getDocumentCatalog().getAcroForm(); > > PDField field = acroForm.getField("field2"); > > COSString fieldValue = new COSString("FIELD2"); > > field.getDictionary().setItem(COSName.V, fieldValue); > > doc.addSignature(signature, this); > > doc.saveIncremental(fis, fos);// Of course, doc.save() wont work. > > doc.close(); > > > > In short, I would like to know how to add form fill-ins by > saveincremental > > > > Thanks > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >

