Delete Unwanted Pages From PDF using n8n action
PDF4me Delete Unwanted Pages From PDF removes specific pages from PDF documents through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to delete pages using flexible targeting methods (specific page numbers, page ranges, comma-separated values) with precise page identification and accurate removal while preserving document integrity. This solution is ideal for document editing, content refinement, page cleanup, confidential page removal, document customization, and automated page deletion workflows that require precise page targeting with reliable removal and seamless integration.
Setup
Add the PDF4me "Delete Unwanted Pages From PDF" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "Delete Unwanted Pages From PDF" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Delete unwanted Pages from PDF action. Configure these parameters to control page deletion.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Input Data Type | Required | Choose how to provide the PDF file to delete unwanted pages from. Options: Binary Data, Base64 String, URL. Default is `Binary Data`. | Binary Data |
| Input Binary Field | Conditional | Name of the binary property that contains the PDF file (usually "data" for file uploads). Shown when Input Data Type is Binary Data. Default is `data`. | data |
| Base64 PDF Content | Conditional | Base64 encoded PDF document content. Shown when Input Data Type is Base64 String. | UEsDBBQABgAI... |
| PDF URL | Conditional | URL to the PDF file to delete unwanted pages from. Shown when Input Data Type is URL. | |
| Document Name | Optional | Name sent to PDF4me and used for the output file when the input is Base64, or a URL without a file name. With Binary Data or a URL, the input file's name is used instead. Default is `output.pdf`. | output.pdf |
| Page Numbers | Required | Page numbers to delete (e.g. "2" or "1,3,5" or "2-4"). | 1,2,3 or 2-5 or 1,2,3-7 or 2- |
| Output Binary Field Name | Optional | Name of the binary property to store the output PDF file. Default is `data`. | data |
| Advanced Options | Optional | Optional settings, collapsed behind Add Option. | Add Option |
| Custom Profiles | Optional | Use "JSON" to adjust custom properties. Review Profiles at https://dev.pdf4me.com/apiv2/documentation/ to set extra options for API calls and may be specific to certain APIs. | { "outputDataFormat": "json", "preserveMetadata": true, "optimizeForPrinting": false, "compressionLevel": "medium" } |
Output
Output Parameters
| Field | Type | What it contains |
|---|---|---|
fileName | String | File name of the resulting file. |
mimeType | String | MIME type of the resulting file, for example `application/pdf`. |
fileSize | Number | Size of the resulting file in bytes. |
success | Boolean | True when the operation succeeded. |
message | String | Status message, `Unwanted pages deleted successfully`. |
docName | String | Document name that was sent to PDF4me (same as fileName). |
data | Binary | The PDF without the deleted pages. |
N8N Action Response
The PDF4me Delete Unwanted Pages From PDF API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"fileName": "output.pdf",
"mimeType": "application/pdf",
"fileSize": 2692,
"success": true,
"message": "Unwanted pages deleted successfully",
"docName": "output.pdf"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| fileName | output.pdf |
| mimeType | application/pdf |
| fileSize | 2692 |
| success | true |
| message | Unwanted pages deleted successfully |
| docName | output.pdf |
Schema View
The data structure and types of the response:
1 item
fileName: AB output.pdf
mimeType: AB application/pdf
fileSize: # 2692
success: ☑ true
message: AB Unwanted pages deleted successfully
docName: AB output.pdf
Type Indicators:
AB= String#= Number☑= Boolean[]= Array
Binary Data View
The actual edited PDF file data and metadata:
data
─────────────────────────────
File Name: output.pdf
File Extension: pdf
Mime Type: application/pdf
File Size: 2.6 KB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Document Customization and Editing
- Remove specific pages from reports and presentations for different audiences
- Delete confidential or sensitive pages before sharing documents
- Customize documents by removing unnecessary sections or pages
Content Management and Organization
- Remove outdated pages from regularly updated documents
- Delete duplicate or redundant pages from merged documents
- Clean up documents by removing unwanted content sections
Automated Document Processing
- Integrate page deletion into document processing workflows
- Automatically remove specific pages during batch processing operations
- Streamline document preparation for different distribution channels