Hi I am using Aspose.PDF dll for .net to flatten an existing pdf that is an xfa form. The output resultant file becomes editable and a form template appears to be inserted. How can I get the resultant file to look flattened or readonly?
Here is the code:
string filename = @"c:\temp\" + "FAADV.pdf";
Aspose.Pdf.Document document = new Aspose.Pdf.Document(filename);
//set the form fields as Standard if Dynamic
if (document.Form.Type == Aspose.Pdf.InteractiveFeatures.Forms.FormType.Dynamic)
{
document.Form.Type = Aspose.Pdf.InteractiveFeatures.Forms.FormType.Standard;
}
document.Save(@"c:\temp\FAADV_flattened.pdf";