Is there anyway i can disable/lock the saved PDF after using RadFixedDocument to fill up the form field?
I do not want user to edit the field's content after they have filling up a web form and i merged the data to to the predefined PDF form.
1 Answer, 1 is accepted
answered on 20 Feb 2020, 01:53 PM
You can use the following approach for this:
var provider = new PdfFormatProvider();
var document = provider.Import(File.ReadAllBytes(@"..\..\filled_form.pdf"));
var fields = document.AcroForm.FormFields;
foreach (var item in fields)
item.IsReadOnly = true;
using (FileStream fs = new FileStream(@"..\..\readOnly.pdf", FileMode.OpenOrCreate))
I hope this helps. Should you have any other questions do not hesitate to ask.
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.