I’m using the following code to make a pdf form read only:
FileStream fs = new FileStream(pdfInputPath, FileMode.Open, FileAccess.ReadWrite);
// Instantiate Document instance
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fs);
Aspose.Pdf.Facades.FormEditor fm = new Aspose.Pdf.Facades.FormEditor(pdfDocument, fs);
foreach (Field formField in pdfDocument.Form.Fields)
{
if (formField.FullName.Contains(“saveform”))
{
fm.RemoveField(formField.FullName);
}
if (formField.FullName.Contains(“Button1”))
{
fm.RemoveField(formField.FullName);
}
}
fm.Save();
fs.Flush();
fs.Dispose();
Aspose.Pdf.Facades.Form pdfForm = new Aspose.Pdf.Facades.Form(pdfInputPath, pdfoutPath + "\\" + InputFileName);
pdfForm.FlattenAllFields();
pdfForm.Save();
When I save the form using the above code and reopen using adobe reader, I’m getting “The document enabled extended features in adobe reader. The document has been changed since it was created…”. Is there any way I can suppress this prompt or change the code in such a way that the prompt does not come up? Any help is much appreciated.