title: XFA dynamic form - iText populate unlocked field invalidate signature
body: <p>we are using PDF dynamic form generated through Adobe life cycle designer 9. Form data are stored in XFA and are set by iText as well as by user interaction in Adobe Reader (So It's reader-enabled PDF form and signatures lock just some of the fields - FieldMDP). </p>
  
  <p>Here is our scenario we need to use and in this link you can find the screenshot of PDF (<a href="https://onedrive.live.com/?cid=195541F2D86BFC76&amp;id=195541f2d86bfc76%21107&amp;v=3&amp;authkey=%21AGtMASJ3wPHv1hU" rel="nofollow">https://onedrive.live.com/?cid=195541F2D86BFC76&amp;id=195541f2d86bfc76%21107&amp;v=3&amp;authkey=%21AGtMASJ3wPHv1hU</a>):</p>
  
  <ol>
  <li>iText fill in 3 fields in PDF form (in our example fields marked as "Locked by S1 ...")</li>
  <li>user changes value in one of the previous fields (marked as "Locked by S1") and signs the document using approval signature (through field S1), which locks the previous 3 fields (marked as "Locked by S1...")</li>
  <li>itext fill in the other field, which is not locked by S1 signature (marked as "Locked by S2 RO")</li>
  <li>After user displays PDF and validates signature S1, Adobe Reader shows information that signature in field S1 is invalid, because there was change in field "Locked by S1" although iText didn't change this field value.</li>
  </ol>
  
  <p>Here are my observations when I was playing with similar scenarios:</p>
  
  <ul>
  <li>if in step 2 user does not make any change to the field filled in by iText (with 'Val3') and just signs the document in field S1, then signature remains valid (in link below it is file: PDF_u1s1u2_validSig)</li>
  <li>we are using iText 5.4.1 however we've tried also iText 5.5.5 with the same result</li>
  <li>we need to use Adobe Reader 11. However when we validated the PDF with invalid signature in Adobe Reader 9, there we can see the signature as valid. All the higher versions of Adobe Reader 9.5, 10, 11 we've tried shows the signature as invalid.</li>
  <li>if we check the field value which invalidates the signature in Adobe Acrobat and we compare the signed revision with the PDF with invalid signature, then this field is not marked as changed (values are the same in both versions) so we don't understand why it is marked as changed.</li>
  </ul>
  
  <p>Screenshots of invalid and valid PDF and also the PDF forms you can find in URL: <a href="https://onedrive.live.com/redir?resid=195541f2d86bfc76!108&amp;authkey=!AGtMASJ3wPHv1hU&amp;ithint=folder%2cpng" rel="nofollow">https://onedrive.live.com/redir?resid=195541f2d86bfc76!108&amp;authkey=!AGtMASJ3wPHv1hU&amp;ithint=folder%2cpng</a></p>
  
  <p>Thanks for any input which could clarify why first signature is invalidated.</p>