> **Source:** https://knowledge.leegality.com/document-execution/settings/Department/document-config > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # Document Configuration ## Enforce PDF Flattening **What is PDF Flattening?** PDF flattening is the process of converting a dynamic or interactive PDF document into a static one by merging all the layers and interactive elements. This ensures that the visual appearance of the document remains consistent across different viewing platforms and prevents further editing of its contents. **Why enforce PDF Flattening?** When a PDF is digitally signed and then flattened after filling form fields, the signature and the filled form fields become part of the static image of the document. This process ensures that both the signature and the filled form fields are preserved and cannot be altered or tampered with without invalidating the signature. Flattening the PDF ensures that the signed document and the filled form fields are locked in place. This prevents anyone from modifying the contents of the document or the filled form fields without invalidating the signature. It helps maintain the integrity and authenticity of the signed document. **What happens if PDF flattening is not enabled?** If PDF flattening is not enabled, it means that the form fields remain editable even after the document has been digitally signed. This presents a significant risk because it allows anyone with access to the document to modify the variable fields without invalidating the signature. As a result, the integrity and authenticity of the document are compromised, as it becomes susceptible to tampering. ### To Enable PDF Flattening 1. Click on the **Setting ⚙️** icon on the top right corner. 2. Go to **Department > Document Configs**. 3. Enable **Enforce PDF Flattening toggle**. 4. Click **Update**. --- ## Automatically Delete Draft Documents You can use this feature to automatically delete all the documents in the draft after a pre-specified time duration. > **Info — note** > > By default, documents in the Draft will be deleted after 30 days of the creation date. For draft documents with affixed stamps, the stamps remain reserved and cannot be used in another document until the draft is deleted. ### To automatically delete documents in Draft 1. Click on the **Setting ⚙️** icon on the top right corner. 2. Go to **Departments > Document Configs**. 3. Enable **Enforce auto-deletion of draft documents** toggle. Provide the number of days for document retention. (Days can range from 1 to 365) 4. Click **Update**.