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
- 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
- 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 Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
This node operation "Add Page Number To PDF" allows users to add page numbers to an existing PDF document. It supports multiple input methods for the source PDF, including binary data from a previous node, a base64 encoded string, or a URL pointing to the PDF file. Users can customize the appearance and positioning of the page numbers, such as alignment, margins, font size, and style (bold/italic). There is also an option to skip numbering on the first page.
This node is beneficial in scenarios where automated document processing workflows require pagination for easier navigation, referencing, or compliance with formatting standards. For example, adding page numbers to reports generated dynamically, legal documents, or multi-page invoices before sending them out.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file: "Binary Data" (from previous node), "Base64 String" (direct content), or "URL" (link to PDF file). |
| Input Binary Field | Name of the binary property containing the PDF file (used if Input Data Type is "Binary Data"). |
| Base64 PDF Content | Base64 encoded string of the PDF document content (used if Input Data Type is "Base64 String"). |
| PDF URL | URL to the PDF file to add page numbers to (used if Input Data Type is "URL"). |
| Output File Name | Desired filename for the output PDF with page numbers added. |
| Document Name | Name of the source PDF file for reference purposes. |
| Horizontal Alignment | Horizontal position of page numbers on the page: Left, Center, or Right. |
| Vertical Alignment | Vertical position of page numbers on the page: Top, Middle, or Bottom. |
| Horizontal Margin (Mm) | Horizontal margin in millimeters (0-100) from the chosen alignment edge. |
| Vertical Margin (Mm) | Vertical margin in millimeters (0-100) from the chosen alignment edge. |
| Font Size | Font size for the page numbering text, ranging from 8 to 72 points. |
| Set Bold | Whether the page number text should be bold. |
| Set Italic | Whether the page number text should be italicized. |
| Skip First Page | Option to skip adding page numbers on the first page of the document. |
| Advanced Options | Custom JSON profiles to adjust extra API call properties for advanced use cases. |
| Binary Data Output Name | Custom name for the binary data field in the node's output containing the resulting PDF. |
Output
The node outputs the processed PDF file with page numbers added as binary data. The binary data field name can be customized via the "Binary Data Output Name" property (default is "data"). The output contains the PDF file ready for further use or download within the workflow.
The json output typically includes metadata about the operation or references to the binary data but primarily serves to carry the binary PDF content.
Dependencies
- Requires access to an external PDF processing service or API capable of adding page numbers to PDFs.
- Needs proper API authentication configured in n8n credentials (e.g., an API key or token).
- Network access is required if the input PDF is provided via URL or if the service is cloud-based.
Troubleshooting
Common Issues:
- Invalid or inaccessible PDF URL: Ensure the URL is publicly accessible or reachable by the node.
- Incorrect binary property name: Verify that the binary field name matches the actual input binary data property.
- Malformed base64 content: Confirm the base64 string is correctly encoded and complete.
- Font size or margin values out of allowed range: Use values within specified limits to avoid errors.
Error Messages:
- Errors related to missing or invalid input data usually indicate misconfiguration of input properties.
- Authentication failures suggest incorrect or missing API credentials.
- API response errors may occur if the PDF is corrupted or unsupported.
Resolving these typically involves verifying input data correctness, ensuring valid credentials, and checking network connectivity.
Links and References
- PDF4me API Documentation — for advanced profile options and API capabilities.
- General PDF manipulation best practices and guidelines for page numbering.