Actions80
- Extract Text From Word
- Find And Replace Text
- Convert PDF To Editable PDF Using OCR
- Create Swiss QR Bill
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Create PDF/A
- Convert HTML To PDF
- Convert Markdown To PDF
- Upload File To PDF4me
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Fill PDF Form
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- AI-Invoice Parser
- AI-Process HealthCard
- AI-Process Contract
- Generate Barcode
- Classify Document
- Parse Document
- Linearize PDF
- Flatten PDF
- Convert To PDF
- Json To Excel
- Convert PDF To Excel
- Convert PDF To Word
- Convert PDF To PowerPoint
- Convert VISIO
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Extract Pages
- Merge Multiple PDFs
- Overlay PDFs
- Rotate Document
- Rotate Page
- Sign PDF
- URL to PDF
- Add Image Watermark To Image
- Add Text Watermark To Image
- Compress Image
- Convert Image Format
- Create Images From PDF
- Flip Image
- Get Image Metadata
- Image Extract Text
- Remove EXIF Tags From Image
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Image
- Rotate Image By EXIF Data
- Compress PDF
- Get PDF Metadata
- Repair PDF Document
- Get Document From Pdf4me
- Update Hyperlinks Annotation
- Protect Document
- Unlock PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Generate Document Single
- Generate Documents Multiple
- Get Tracking Changes In Word
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Attachment From PDF
- Extract Text By Expression
- Extract Table From PDF
- Extract Resources
Overview
The node provides a "Flatten PDF" operation that processes PDF files to convert interactive and layered elements into static content. Flattening a PDF is useful when you want to ensure the document's appearance remains consistent and uneditable, such as finalizing forms, annotations, signatures, or interactive elements before distribution or archiving.
Common scenarios include:
- Converting fillable form fields into plain text so recipients cannot modify them.
- Making annotations and comments permanent parts of the document.
- Merging multiple layers into one for simpler viewing or printing.
- Rendering digital signatures visually without retaining their interactive properties.
- Disabling buttons, links, and other interactive features by converting them to static content.
Practical example: A company collects filled PDF forms from clients and wants to lock the data by flattening the forms and annotations before storing or sharing the documents.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file to flatten: - Binary Data: Use PDF file from previous node - Base64 String: Provide PDF content as base64 encoded string - URL: Provide URL to PDF file |
| Input Binary Field | Name of the binary property containing the PDF file (used if Input Data Type is Binary Data) |
| Base64 PDF Content | Base64 encoded PDF document content (used if Input Data Type is Base64 String) |
| PDF URL | URL to the PDF file to flatten (used if Input Data Type is URL) |
| Output File Name | Name for the output flattened PDF file (e.g., "flattened_document.pdf") |
| Document Name | Name of the source PDF file for reference (e.g., "document.pdf") |
| Flattening Options | Collection of boolean options controlling what elements to flatten: - Flatten Forms: Convert form fields to static text - Flatten Annotations: Convert annotations to permanent marks - Flatten Layers: Merge all layers - Flatten Digital Signatures: Convert digital signatures to visual representation only - Flatten Interactive Elements: Convert buttons, links, and other interactive elements to static content |
| Advanced Options | Additional optional settings: - Custom Profiles: JSON string to adjust custom properties for API calls (see external profiles documentation) - Use Async Processing: Whether to use asynchronous processing (recommended for large files) |
Output
The node outputs the flattened PDF file in binary format under the standard binary property with the specified output file name. The json output contains metadata about the processed file, typically including the filename and possibly other relevant information.
If the input was provided as binary data, base64 string, or URL, the output will be the flattened PDF file ready for further use or download.
Dependencies
- Requires an external PDF processing service accessible via API to perform the flattening operation.
- Needs an API key or authentication token configured in n8n credentials to authorize requests to the PDF processing service.
- Optional advanced configuration can be done using custom JSON profiles referencing the external service's profile documentation.
Troubleshooting
- Common issues:
- Providing an invalid or inaccessible PDF URL will cause errors fetching the file.
- Incorrect base64 encoding or corrupted binary data input may result in processing failures.
- Large PDF files might time out or fail if asynchronous processing is not enabled.
- Error messages:
- Errors related to authentication indicate missing or invalid API credentials.
- File format errors suggest the input is not a valid PDF.
- Timeout or processing errors can often be resolved by enabling asynchronous processing in advanced options.
Links and References
- PDF4me API Profiles Documentation — for customizing flattening options via JSON profiles.