iTextSharp PdfStamper.PartialFormFlattening flattening only some, not all, of the fields
<p>The code below is correctly assigning the value "foo" to the named field, but the field is not being "flattened".   I must be neglecting a step, but I don't know what it is. Please advise. Thanks.</p>

<pre><code>public byte[] FlattenSpecifiedFormFields(byte[] b, List&lt;string&gt; fieldNames2Flatten)
    {
        PdfReader reader = new PdfReader(b);
        using (var ms = new MemoryStream())
        {
            var stamper = new iTextSharp.text.pdf.PdfStamper(reader, ms);               
            foreach (string name in fieldNames2Flatten)
            {

                stamper.AcroFields.SetField(name, "foo");
                stamper.PartialFormFlattening(name);
            }

            stamper.Close();
            return ms.ToArray();
        };
    }
</code></pre>