Skip to main content

Delete Pages From Word Document using n8n action

PDF4me Delete Pages From Word Document enables removing specific pages or page ranges from Word documents through n8n automation workflows with flexible page selection options. This powerful page deletion feature supports range-based deletion (start page to end page), specific page number deletion (comma-separated lists), and combined deletion patterns with full control over page selection, document optimization, and content cleanup, perfect for document refinement, content management, and document preparation workflows.

Setup

Add the PDF4me "Delete Pages From Word Document" 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 Pages From Word Document" action
  3. Configure input parameters (see below)
Delete Pages From Word Document

Parameters

Complete list of parameters for the Delete Pages From Word Document action. Configure these parameters to control page deletion behavior.

Important: Parameters marked with an asterisk (***) are required. At least one page deletion parameter (Start Page, End Page, or Page Numbers) must be provided.

ParameterTypeDescriptionExample
Input Data Type***StringWord Document Input Format Selection
• Choose the format of your Word document data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary Field***BinaryBinary Word File Input (Required if Binary Data)
• Reference Word file (.docx, .doc) from previous n8n node or file upload
• PDF4me processes binary Word files with automatic format detection
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Word Content***StringBase64 Encoded Word Input (Required if Base64 String)
• Provide Word content (.docx, .doc) as base64 encoded string for secure transmission
• PDF4me automatically decodes and processes the Word content
• Required when Input Data Type is "Base64 String"
UEsDBBQABgAI...
Word Document URL***StringPublic Word Document URL Input (Required if URL)
• Provide a public/open permission URL to the Word file (.docx, .doc) to be processed
• PDF4me downloads and processes the Word file from the provided URL
• Required when Input Data Type is "URL"
https://abc.com/document.docx
Word Document Name***StringWord Document Input Filename
• Specify the name of the input Word file with proper extension (.docx, .doc)
• PDF4me uses this for format detection and processing optimization
document.docx
Start PageNumberStart Page Number
• Page number to begin deleting from (1-based index)
• Must be ≥ 1 and ≤ document page count
• If only Start Page provided, deletes from this page to end of document
• Cannot be greater than End Page
• At least one page deletion parameter (Start Page, End Page, or Page Numbers) must be provided
2
End PageNumberEnd Page Number
• Page number to stop deleting at (1-based index)
• Must be ≥ Start Page and ≤ document page count
• Used with Start Page to define deletion range
• Range is inclusive (both start and end pages deleted)
5
Page NumbersStringSpecific Page Numbers
• Comma-separated list of specific page numbers to delete
• Format: "1,3,4" or "1-3,5,7-9"
• Can be used alone or combined with Start Page/End Page
• Invalid page numbers are silently ignored
"2,4,6"
Culture NameStringDocument Culture/Locale
• Culture code for document processing (e.g., "en-US", "de-DE", "fr-FR")
• Default: null (no culture-specific processing)
en-US

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringWord document filename with pages deleted - The name of the output Word document file after page deletiondocument_pages_deleted.docx
fileSizeNumberFile size in bytes - The size of the Word document in bytes after page deletion13398
successBooleanPDF4me operation status - Boolean flag indicating the success or failure of the page deletion operation. PDF4me returns true for successful operations and false for any errorstrue
originalFileNameStringOriginal Word document filename - The name of the input Word document filedocument.docx
startPageNumberStart page number - The starting page number of the deleted page range (if range deletion was used)2
endPageNumberEnd page number - The ending page number of the deleted page range (if range deletion was used)5
cultureNameStringCulture/Locale code - Culture code used for document processing (e.g., "en-US", "de-DE", "fr-FR")en-US
messageStringOperation message - Descriptive message indicating the result of the page deletion operationSuccessfully deleted pages from Word document

N8N Action Response

The PDF4me Delete Pages From Word Document 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": "document_pages_deleted.docx",
"fileSize": 13398,
"success": true,
"originalFileName": "document.docx",
"startPage": 2,
"endPage": 5,
"cultureName": "en-US",
"message": "Successfully deleted pages from Word document"
}
]

Use Cases

Enterprise Document Automation

  • Document Refinement: Remove unwanted pages from documents
  • Content Cleanup: Clean up documents by removing unnecessary content
  • Document Preparation: Prepare documents for distribution by removing specific pages
  • Archive Management: Optimize documents for storage

AI-Powered Document Processing

  • Multi-Format Support: Process Word documents in .docx and .doc formats
  • Multi-Language Processing: Support for different languages and regions
  • Intelligent Page Selection: Automatic page number validation

Business Intelligence and Analytics

  • Document Organization: Organize documents by removing unwanted pages
  • Content Management: Manage content by removing specific sections
  • Performance Metrics: Track processing accuracy and efficiency

Get Help