This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/react-native/forms/flatten.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Flatten PDF form fields in React Native | Nutrient SDK

Nutrient React Native SDK 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 Nutrient.processAnnotations(annotationChange, annotationType, sourceDocumentPath, processedDocumentPath, password) function:

const sourceDocumentPath = ...
const RNFS = require("react-native-fs");
const processedDocumentPath = RNFS.DocumentDirectoryPath + '/flattened.pdf';
Nutrient.processAnnotations('flatten', 'all', sourceDocumentPath, processedDocumentPath, null);

For more details about how to use the processAnnotations() function, refer to our guide on how to process annotations.