Skip to main content

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.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog →

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:

  1. Add PDF4me node to workflow
  2. Select "Delete Unwanted Pages From PDF" action
  3. Configure input parameters (see below)
Delete Unwanted Pages From PDF

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.

ParameterRequiredWhat it doesExample
Input Data TypeRequiredChoose 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 FieldConditionalName 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 ContentConditionalBase64 encoded PDF document content. Shown when Input Data Type is Base64 String.UEsDBBQABgAI...
PDF URLConditionalURL to the PDF file to delete unwanted pages from. Shown when Input Data Type is URL.
Document NameOptionalName 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 NumbersRequiredPage 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 NameOptionalName of the binary property to store the output PDF file. Default is `data`.data
Advanced OptionsOptionalOptional settings, collapsed behind Add Option.Add Option
Custom ProfilesOptionalUse "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​

FieldTypeWhat it contains
fileNameStringFile name of the resulting file.
mimeTypeStringMIME type of the resulting file, for example `application/pdf`.
fileSizeNumberSize of the resulting file in bytes.
successBooleanTrue when the operation succeeded.
messageStringStatus message, `Unwanted pages deleted successfully`.
docNameStringDocument name that was sent to PDF4me (same as fileName).
dataBinaryThe 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 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"
}
]

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

Get Help​