Hi, I tested your file again and it turned out to be correct again, even without removing the duplicating field! The problem occured yestoday is something wrong about test program. Here is my test code, and you can tell me the result after testing with it yourself:
AutoFiller autoFiller = new AutoFiller();
autoFiller.InputFileName = "B29_1.pdf";
autoFiller.OutputFileName = "B29_1_auto_output.pdf";
//Construct the data table with only 3 columns
DataTable mDataTable = new DataTable();
DataColumnCollection columns = mDataTable.Columns;
columns.Add("CompanyNameHospital",typeof(string));
columns.Add("NameFormatted",typeof(string));
columns.Add("SocialSecurityNumber",typeof(string));
//construct two row of data which should be obtained from DB
DataRow myRow = mDataTable.NewRow();
myRow["CompanyNameHospital"] = "aspose.com";
myRow["NameFormatted"] = "duplicated";
myRow["SocialSecurityNumber"] = "23045-123-1435";
mDataTable.Rows.Add(myRow);
DataRow hisRow = mDataTable.NewRow();
hisRow["CompanyNameHospital"] = "aspose.kit.com";
hisRow["NameFormatted"] = "another one";
hisRow["SocialSecurityNumber"] = "888-8888-8885";
mDataTable.Rows.Add(hisRow);
autoFiller.ImportDataTable(mDataTable);
autoFiller.Save();
I constructed data staticly and only filled three fields, including the duplicated one. The output file consistes of 4 correct Pages, all highlights remains.
I would like to remind that you should pay attention to:
1. The filled field will be flattened if you didn't call the method AutoFiller.IsFlattenField (string fieldName)
2. Please be sure that the data obtained from DB is right for the PDF template
3. Also be sure that you get the latest verion of Aspose.Kit.
Sorry for the inconvinience brings to you and we will help you until it works.
Best regards.