Flatten PDF Forms Fields in Flutter

PSPDFKit for Flutter allows you to create a new document with flattened forms. In a document with flattened forms, the form fields and their contents are still visible, but they’re no longer editable.

The example below shows how to flatten forms using the processAnnotations function:

// First open a PDF file using `present()`.
await Pspdfkit.processAnnotations('all', 'flatten', 'PDFs/flattened-form.pdf');

For more details about how to use the processAnnotations() function, please refer to our Process Annotations guide.