Actions80
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Image Watermark To Image
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- Add Text Watermark To Image
- AI-Invoice Parser
- AI-Process Contract
- AI-Process HealthCard
- Classify Document
- Compress Image
- Compress PDF
- Convert HTML To PDF
- Convert Image Format
- Convert JSON To Excel
- Convert Markdown To PDF
- Convert PDF To Editable PDF Using OCR
- Convert PDF To Excel
- Convert PDF To PowerPoint
- Convert PDF To Word
- Convert To PDF
- Convert URL to PDF
- Convert VISIO
- Convert Word to PDF Form
- Create Images From PDF
- Create PDF/A
- Create Swiss QR Bill
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Split PDF By Barcode
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Extract Attachment From PDF
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Resources
- Extract Table From PDF
- Extract Text By Expression
- Extract Text From Word
- Fill PDF Form
- Find And Replace Text
- Flip Image
- Flatten PDF
- Generate Barcode
- Generate Document Single
- Generate Documents Multiple
- Get Document From Pdf4me
- Get Image Metadata
- Get PDF Metadata
- Split PDF By Swiss QR
- Get Tracking Changes In Word
- Image Extract Text
- Linearize PDF
- Merge Multiple PDFs
- Overlay PDFs
- Parse Document
- Protect PDF
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Remove EXIF Tags From Image
- Repair PDF Document
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Document
- Rotate Image
- Rotate Image By EXIF Data
- Rotate PDF Page
- Sign PDF
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
This node operation, Delete Unwanted Pages From PDF, allows users to remove specific pages from a PDF document. It is useful in scenarios where you have a multi-page PDF but only want to keep certain pages or exclude unwanted ones before further processing or sharing.
Practical examples include:
- Removing confidential or irrelevant pages from a report before distribution.
- Extracting only the necessary pages from a scanned document.
- Cleaning up PDFs by deleting blank or duplicate pages.
The node supports multiple ways to provide the input PDF: as binary data from a previous node, as a base64 encoded string, or via a URL pointing to the PDF file.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | How the PDF file is provided. Options: • Binary Data (from previous node) • Base64 String (directly provide PDF content) • URL (link to the PDF file) |
| Input Binary Field | The name of the binary property containing the PDF file when using Binary Data input type (usually "data"). |
| Base64 PDF Content | The base64 encoded string representing the PDF document content, used if Input Data Type is Base64 String. |
| PDF URL | The URL to the PDF file, used if Input Data Type is URL. |
| Document Name | The desired filename for the output PDF document after pages are deleted. Defaults to "output.pdf". |
| Page Numbers | Specifies which page numbers to delete from the PDF. Supports single pages (e.g., "2"), multiple pages separated by commas (e.g., "1,3,5"), or ranges (e.g., "2-4"). |
| Output Binary Field Name | The name of the binary property where the resulting PDF file will be stored. Defaults to "data". |
| Advanced Options | Optional JSON string to specify custom profiles or additional API options for advanced use cases. For example, adjusting output data format or other API-specific settings. |
Output
The node outputs the modified PDF document with the specified pages removed. The output is provided as binary data under the configured binary field name (default "data"). This binary data represents the updated PDF file ready for downstream nodes or saving.
The json output typically contains metadata about the operation or the processed document, but the main content is the binary PDF file.
Dependencies
- Requires access to an external PDF processing API service that performs the actual page deletion.
- Needs proper API authentication credentials configured in n8n to authorize requests to the PDF processing service.
- Internet connectivity is required if the input PDF is provided via URL or if the API is cloud-based.
Troubleshooting
Common Issues:
- Incorrect page number format can cause errors. Ensure page numbers are valid and formatted correctly (e.g., "1,3,5" or "2-4").
- Providing an invalid or inaccessible URL will result in failure to fetch the PDF.
- If the binary input field name does not match the actual binary property from the previous node, the PDF will not be found.
- Missing or invalid API credentials will cause authorization errors.
Error Messages:
- "Invalid page numbers" — Check the page numbers input for correct syntax and valid page references.
- "Failed to fetch PDF from URL" — Verify the URL is correct and accessible.
- "No PDF file found in binary property" — Confirm the binary property name matches the input data.
- "Authentication failed" — Ensure API credentials are properly set up in n8n.
Resolving these usually involves verifying inputs, credentials, and network accessibility.
Links and References
- PDF4me API Documentation — For details on custom profiles and advanced API options.
- General PDF page manipulation concepts: https://en.wikipedia.org/wiki/PDF