Pdf gets flattened after editing the fields

I used the information in this section and the resulted pdf has indeed the values I completed but no field can be edited anymore.

@cipytan

Can you please share your sample PDF with the code snippet version that you used? We will test the scenario in our environment and address it accordingly.

Hello and thank you for your reply. Unfortunately, I am not allowed to give you the pdf I am using, but here is the code I am using for one field.

  Aspose.Pdf.Document document = new Aspose.Pdf.Document("PdfTemplates/test.pdf");

  XFA xfa = document.Form.XFA;

  xfa["Parent[0].Page1[0].Title[0]"] = "TEST 123";

  document.Save("FilledXFAForm_Aspose.pdf");

@cipytan

The code seems correct. However, we do need sample document to reproduce the issue. Can you please try to use the incremental save i.e. use Document.Save() method without any argument? You can create a copy of the original PDF and use incremental saving to see if it helps.