Link Menu Expand (external link) Document Search Copy Copied

Flatten PDF

Definition

The Flatten PDF action allows you to convert interactive form fields (such as text boxes, checkboxes, and radio buttons) within a PDF document into static graphical content, permanently locking the data into the document’s physical layer.

  • Transforms dynamic XFA or AcroForm fields into permanent, non-editable text and graphics to ensure strict document integrity.
  • Secures documents by applying passwords and configuring granular permissions for printing, copying, and editing.
  • Acts as a structural utility to prevent form fields from breaking or disappearing when extracting or merging specific pages in complex document assemblies.

This action is essential for finalizing legal contracts or archiving regulatory forms, ensuring that once a document is processed in your automated workflow, its data remains fixed, tamper-proof, and visually consistent across all PDF viewers.

Inputs

1. PDF Document:

  • Purpose: This field is used to supply the actual PDF file that contains the interactive form fields you want to convert into static text.
  • Practical Guidance: You will typically provide this dynamically by using the token picker to select a PDF file generated or retrieved from a previous step in your flow.
  • Use Case Context: You would use this field to pass a newly signed contract into the action so its form fields can be permanently locked.

2. Document Password:

  • Purpose: This is used to unlock the source PDF if it is currently protected by a password.
  • Practical Guidance: You can type a specific password directly as a static value if it is always the same, or use the token picker to pass a dynamic password from an earlier step. Leave this blank if the file is not protected.
  • Use Case Context: You would use this field to ensure zenphi has the necessary access to open and flatten a secured employee onboarding form.

3. File Name:

  • Purpose: This allows you to specify a custom name for the newly flattened PDF file.
  • Practical Guidance: You can type a static name like Final_Contract.pdf, or combine static text with dynamic values from the token picker (e.g., Final_Contract_[Client Name].pdf). If left blank, it defaults to the original file’s name.
  • Use Case Context: You would use this field to clearly distinguish the finalized, flattened document from the original draft in your storage system.

4. Password Protect:

  • Purpose: This toggle allows you to add a layer of security by requiring a password to open the newly flattened document.
  • Practical Guidance: You simply select true or false as a static choice to enable or disable this feature.
  • Use Case Context: You would enable this feature to ensure that only authorized individuals can view a flattened PDF containing sensitive financial data.

User Password:

  • Purpose: This defines the exact password that recipients must enter to open the flattened PDF.
  • Practical Guidance: You can enter a static password that never changes, or use the token picker to generate a unique, dynamic password (like a user’s ID) for each document.
  • Use Case Context: You would use this field to secure a flattened payslip with the specific employee’s unique identification number.

5. Enable Document Restriction:

  • Purpose: This toggle lets you apply specific security restrictions to the flattened PDF, controlling what users can do with the file (like printing or copying).
  • Practical Guidance: Set this to true as a static value to reveal and configure advanced security settings, or false to leave the document unrestricted.
  • Use Case Context: You would enable this feature to prevent recipients from copying text out of a proprietary business proposal.

Owner Password:

  • Purpose: This sets a master password that allows an administrator to bypass the document’s restrictions and change its permissions later.
  • Practical Guidance: Type a strong, static password directly into the field, or use the token picker to retrieve a securely stored password from your system.
  • Use Case Context: You would use this field to ensure your legal team retains full control over the document’s security settings even after it is distributed.

Print Setting:

  • Purpose: This determines whether users are allowed to print the flattened document, and at what quality.
  • Practical Guidance: Select the desired printing permission level from the predefined dropdown list (options include “Disable printing”, “low resolution”, or “full resolution”) as a static value.
  • Use Case Context: You would use this field to prevent users from printing a highly confidential digital-only report.

Read Only:

  • Purpose: This toggle instantly locks down the document by encrypting content, disabling copy/paste, and preventing any annotations or form editing.
  • Practical Guidance: Toggle this switch to true for maximum security, or false to manually configure specific edit and copy permissions.
  • Use Case Context: You would enable this feature to quickly and completely secure an archived regulatory form against any form of tampering or data extraction.

Edit Setting:

  • Purpose: This defines exactly what level of editing is permitted in the document.
  • Practical Guidance: You select a specific permission level from the dropdown menu (options include “Disable editing”, “Edit Pages Only”, or “Edit Everything”) as a static value. This field is only available if the Read Only toggle is disabled.
  • Use Case Context: You would use this field to allow users to extract pages from the PDF without letting them alter the text.

Allow Annotations:

  • Purpose: This toggle controls whether users can add comments or highlight text within the flattened document.
  • Practical Guidance: Toggle this switch to true or false as a static value. It is only visible when the Read Only toggle is disabled.
  • Use Case Context: You would enable this feature so that a manager can add review notes to a flattened performance report.

Allow Copy Paste Content:

  • Purpose: This determines if users are permitted to highlight, copy, and extract text or images from the PDF.
  • Practical Guidance: Toggle this switch to true or false as a static choice. This option is only available if the Read Only toggle is disabled.
  • Use Case Context: You would disable this feature to protect the intellectual property within a flattened training manual.

Allow Form Data:

  • Purpose: This controls whether users can fill in any remaining, non-flattened form fields (if applicable) in the document.
  • Practical Guidance: Toggle this switch to true or false as a static setting. This field only appears when the Read Only toggle is disabled.
  • Use Case Context: You would use this field to permit a user to sign a specific signature field while the rest of the document’s data remains locked.

Outputs

1. Name:

  • Data Description: This output provides the final file name of the newly flattened PDF document, including its extension.
  • Workflow Utility: This output is highly useful in subsequent steps because you can pass it to a Send Email action to dynamically populate the email subject line, or use it in a Save File action to ensure the document is stored with the correct title in Google Drive or SharePoint.

2. Size:

  • Data Description: This output provides the file size of the flattened PDF document, measured in bytes.
  • Workflow Utility: This data is essential for conditional logic in later steps; for example, you can use an If Condition to check if the file size exceeds an email attachment limit (e.g., 25MB) and route it to a cloud storage upload step instead.

3. PDF Document:

  • Data Description: This is the actual flattened PDF file object itself, with all interactive form fields permanently converted to static content.
  • Workflow Utility: This output is the most critical, as you will pass it directly into subsequent actions to archive the finalized record, or distribute the tamper-proof attachment to clients or stakeholders.

Example Use Cases

1. Finalize Legal Contracts: Flatten signed agreements before distribution to ensure no parties can modify the terms or signatures after the fact.

2. Archive Regulatory Forms: Convert interactive government or internal submission forms into static, archive-ready documents that meet strict long-term compliance standards.

3. Assemble Complex Documents: Flatten documents as a preparatory step before merging multiple PDFs or extracting specific pages to ensure that form data remains visible and consistent.

4. Secure Sensitive Reports: Apply passwords and granular permissions to flattened financial or HR reports to prevent unauthorized viewing, printing, or copying.

Example

Scenario

An HR department receives completed and signed employee onboarding forms as interactive PDFs. To ensure compliance and prevent any post-submission tampering, these forms must be permanently locked into static documents, restricted from being copied or edited, and securely archived in the company’s storage system.

Steps to Implement

1. Set the Trigger:

  • Action: Use a Google Drive File Added trigger to initiate the workflow whenever a new signed onboarding form is uploaded to the designated HR folder.

2. Configure the Flatten PDF Action:

  • PDF Document: Use the token picker to select the file content output from the Google Drive trigger.
  • File Name: Enter a dynamic name like Final_Onboarding_[File Name] using the token picker to clearly distinguish the finalized document from the original draft.
  • Enable Document Restriction: Set this to true as a static value to reveal advanced security settings.
  • Read Only: Toggle this to true to instantly lock down the document, encrypting content and preventing any annotations, copying, or form editing.

3. Archive the Document:

  • Action: Add a Save File action to store the resulting PDF document output from the Flatten PDF action into a secure, final archive folder.

Outcome

The workflow automatically transforms vulnerable, interactive onboarding forms into secure, static records. This eliminates the risk of unauthorized modifications, ensures strict document integrity for compliance purposes, and saves the HR team hours of manual document processing and securing.

Best Practices

1. Flatten Before Extraction: Always use the Flatten PDF action before extracting pages if your document contains form fields with identical names across multiple pages, as this prevents data from disappearing during the extraction process.

2. Use Dynamic File Naming: Clearly distinguish your finalized documents from the original drafts by appending dynamic tokens, such as dates or client names, to the file name field.

3. Monitor File Size: Utilize the size output in an If Condition step to check if the flattened PDF exceeds email attachment limits (e.g., 25MB) before attempting to send it to stakeholders.

4. Apply Read-Only for Archiving: When processing regulatory forms or legal contracts for long-term storage, enable the read-only restriction to instantly apply maximum security against tampering or data extraction.