How to save a "non-editable" PDF form

Good morning

I state that I am new and I am generating a PDF in ASP.NET Core 5.

Specifically, I'm filling out a form created with Acrobat.

Following the example https://help.syncfusion.com/file-formats/pdf/create-pdf-file-in-asp-net-core#filling-forms I see that the saved PDF still has the editable fields and with one different color background.

How can I save the PDF in a non-editable format once the form is populated?

Thanks in advance for the answers


1 Reply 1 reply marked as answer

AG Anantha Gokula Raman Jeyaraman Syncfusion Team August 5, 2021 10:35 AM UTC

Hi Gimmy,

Thank you contacting Syncfusion support.

Our Syncfusion Essential PDF supports form fields to be enabled as read only or flattened on the page. To save the PDF in a non-editable format, we can either use ReadOnly or Flatten properties after the form is filled. The “ReadOnly” property disables the form fields from editing and the “Flatten” property removes the field and prints the graphical representation of the field on the page.

We have supports for enabling read-only for a specific field or the whole document,

//Enables read-only for a specific field.
loadedDocument.Form.Fields[0].ReadOnly = true;
//Enables read-only for the whole document.
loadedDocument.Form.ReadOnly = true;

We can flatten the form fields similarly,

//Enables flatten for a specific field.
loadedDocument.Form.Fields[0].Flatten = true;
//Enables flatten for the whole document.
loadedDocument.Form.Flatten = true;

Kindly refer the following UG documentation for removing editing capability of form fields, https://help.syncfusion.com/file-formats/pdf/working-with-forms#removing-editing-capability-of-form-fields

Kindly let us know if you need any further assistance.


Regards,

Anantha Gokula Raman J


Marked as answer
Loader.
Up arrow icon