There appears to be an issue with the FlattenField command as in the following code fragment:
Dim form As Form = New Form("source.pdf", "dest.pdf")
form.FillField("FirstName", "John")
form.FillField("LastName", "Doe")
form.FlattenField("LastName")
form.Save()
As expected, "LastName" (and "LastName" only) will be "flattened". However as a side effect the field value "John" will be lost and so it appears that "FlattenField" can not be used in combination with "FillField". For me this is a show stopper and I would much appreciate feedback on whether this is to be expected. Also you may want to revise the documentation on "FlattenField" as it appears to be contradictory to its function.
"Source.Pdf" was created with "Adobe LiveCycle Designer ES 8.2". Using Aspose.Pdf ver. 3.3.0.0 for .NET 2.0 SP1 and VS 2008 SP1.
I have tested FillField and FlattenField methods using Aspose.Pdf.Kit 3.3.0.0 over one of my sample Pdf created using same component, and they both are working fine in my case. Please share the Source.Pdf that you are using, so that we can test the issue at our end.
I have tested the scenario using the Pdf file that you have shared and I am able to notice the same problem. We are looking into the details of this problem and will keep you updated with the status of correction.
Hello Martyn,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I have tested the issue in Java environment using Aspose.Pdf.Kit for Java and I am able to notice the problem. I have logged it separately in our issue tracking system as PDFKITJAVA-6510. We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience.
I am sorry to inform that the problem is more complicated than we expected, and it will cost some more days to fix it. Before that, please set the field to be ReadOnly through FormEditor.SetFieldAttribute(String fieldName, PropertyFlag flag). This can also make it uneditable.
Once finished it, we will inform you at this thread.