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
The "Extract Pages From PDF" operation in this node allows users to extract specific pages from a PDF document and create a new PDF containing only those pages. This is useful when you need to isolate certain parts of a large PDF, such as extracting chapters, sections, or relevant pages for sharing, archiving, or further processing.
Common scenarios include:
- Extracting invoice pages from a multi-page PDF report.
- Creating a summary document by selecting key pages.
- Splitting a large PDF into smaller documents based on page ranges.
Users can provide the source PDF in multiple ways: 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 | Choose how to provide the PDF file to extract pages from. Options: • Binary Data (from previous node) • Base64 String (base64 encoded PDF content) • URL (link to PDF file) |
| Input Binary Field | Name of the binary property that contains the PDF file (usually "data" for file uploads). Required if Input Data Type is Binary Data. |
| Base64 PDF Content | Base64 encoded PDF document content. Required if Input Data Type is Base64 String. |
| PDF URL | URL to the PDF file to extract pages from. Required if Input Data Type is URL. |
| Document Name | Name of the output PDF document after extraction. Defaults to "output.pdf". |
| Page Numbers | Page numbers to extract from the PDF. Supports single pages (e.g., "1"), multiple pages separated by commas (e.g., "1,3,5"), or ranges (e.g., "2-4"). |
| Output Binary Field Name | Name of the binary property where the output PDF file will be stored. Defaults to "data". |
| Advanced Options | Optional JSON string to specify custom profiles or additional API options for the extraction process. Useful for advanced users who want to customize the behavior according to external API documentation. |
Output
The node outputs the extracted pages as a new PDF file in binary format. The output is stored in the specified binary property (default "data") with the filename set to the provided Document Name (default "output.pdf").
The json output field typically contains metadata about the operation or the file, but the main content is the binary PDF data representing the extracted pages.
Dependencies
- Requires access to an external PDF processing API service (implied by the bundled code referencing many PDF-related actions).
- Users must configure appropriate API credentials or authentication tokens within n8n to enable communication with the PDF processing service.
- Internet access may be required if providing the PDF via URL or if the API is cloud-based.
Troubleshooting
- Invalid Page Numbers: If the page numbers string is malformed or references pages outside the PDF's range, the operation may fail. Ensure page numbers are correctly formatted and valid.
- Missing Input Data: Providing incorrect input data type or missing the corresponding input field (binary property, base64 content, or URL) will cause errors. Verify that the input matches the selected Input Data Type.
- API Authentication Errors: Failure to authenticate with the external PDF service will result in errors. Check API keys or tokens and ensure they are correctly configured in n8n.
- Network Issues: When using URLs or cloud APIs, network connectivity problems can cause failures. Confirm internet access and URL validity.
- Output Binary Field Conflicts: If the output binary field name conflicts with existing fields, it might overwrite data unintentionally. Use unique names if necessary.
Links and References
- PDF4me API Documentation — For details on custom profiles and advanced options.
- General PDF page extraction concepts: https://en.wikipedia.org/wiki/PDF#Page_extraction_and_manipulation