Free Support Forum - aspose.com

Convert XFA to Standard AcroForm using Aspose.PDF for .NET - Total pages are changed after form type static

I noticed an issue when changing the Adobe Live cycle/XFA form document form type to static, the total number of pages are changed.

Below are the code we used to convert form type to static.
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.Embedded = true;
license.SetLicense(“Aspose.Pdf.lic”);
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(fullPath);
doc.Form.Type = Aspose.Pdf.Forms.FormType.Static;
fullPath = fullPath.Replace("/", “\”);
string fileName = fullPath.Substring(fullPath.LastIndexOf(’\’) + 1);
string path = Path.GetTempPath();
doc.Save(path + “\” + fileName.Replace(".pdf", guid + “.pdf”));
doc.Dispose();
doc = null;
Issue: Total number of pages are not same after form type static.

Please let me know if you need any more details needed on this.

@iarabhavi

Would you please also share the sample PDF document with us for our reference? We will test the scenario in our environment and address it accordingly.