Back to Nodes

PDF Generator API

Last updated Sep 25, 2026

PDF Generator API Node for n8n

136 Weekly Downloads
793 Monthly Downloads

Included Nodes

PDF Generator API

Description

n8n-nodes-pdf-generator-api

This is an n8n community node. It lets you use PDF Generator API in your n8n workflows.

PDF Generator API is a powerful service that allows you to generate PDFs from templates, convert HTML/URLs to PDF, and perform various PDF operations like watermarking, encryption, optimization, and form field manipulation.

n8n is a fair-code licensed workflow automation platform.

Installation
Operations
Credentials
Compatibility
Usage
Resources
Development
Version history

Installation

Follow the installation guide in the n8n community nodes documentation.

Use the package name: @pdfgeneratorapi/n8n-nodes-pdf-generator-api

Operations

This node supports the following operations organized by resource:

Asset

  • Generate QR Code – Generate QR codes with customizable colors and logos
  • – Support for base64 and file output formats
    – Optional logo overlay (from URL or base64)
    – Customizable QR code color

    Document

  • Generate – Generate a PDF document from a template with data
  • Generate (Async) – Generate a PDF document asynchronously with callback
  • Generate (Batch) – Generate multiple PDF documents in batch
  • Generate (Batch + Async) – Generate multiple PDF documents in batch asynchronously
  • List – List generated documents stored in the API
  • Get – Retrieve a specific document by public ID
  • Delete – Delete a document from storage
  • Template

  • Create – Create a new PDF template
  • Update – Update an existing template configuration
  • Get – Retrieve template configuration
  • Delete – Delete a template
  • List – List available templates
  • Copy – Create a copy of an existing template
  • Get Data Fields – Extract data fields used in a template
  • Get Template Schema – Get Template JSON Schema for validation
  • Open Editor – Get URL to open template editor
  • Validate – Validate template configuration
  • Conversion

  • HTML to PDF – Convert HTML content directly to PDF
  • URL to PDF – Convert a public URL to PDF
  • E-Invoice

  • Create E-Invoice – Create an EN 16931 e-invoice as UBL or CII XML
  • Create Factur-X E-Invoice – Create a Factur-X PDF with the CII XML embedded, rendered from a template
  • Create XRechnung E-Invoice – Create an XRechnung 3.0 e-invoice, validated against the German BR-DE rules
  • Get Schema – Get the JSON schema of the accepted invoice payload
  • Notes for the three Create operations:

  • Base64 and file outputs both attach the document as a binary item named data
  • Validation errors from the API (for example [BR-DE-2]) are shown in the node error
  • Known API limitations: BT-11, BT-12, BT-19 and attachments are accepted but not written to the output, and an attachment with unpadded base64 returns a 500
  • PDF Services

  • Add Watermark – Add text or image watermarks to PDF documents
  • Encrypt Document – Encrypt PDF documents with password protection
  • Decrypt Document – Decrypt encrypted PDF documents
  • Optimize Document – Optimize PDF file size for better performance
  • Extract Form Fields – Extract form fields and metadata from PDF documents
  • Fill Form Fields – Fill form fields in PDF documents with provided data
  • Workspace

  • Create – Create a new workspace for organizing templates
  • List – List all workspaces in organization
  • Get – Get workspace information
  • Delete – Delete a workspace
  • Credentials

    To use this node, you need to authenticate with PDF Generator API:

    Prerequisites

    1. Sign up for a PDF Generator API account
    2. Get your API Key and API Secret from Account Settings

    Authentication Setup

    1. In n8n, create new credentials for “PDF Generator API”
    2. Enter your API Key and API Secret

    JWT Authentication

    The node automatically handles JWT token generation using your API credentials. Tokens are generated server-side and include:

  • Issuer (iss): Your API Key
  • Subject (sub): Workspace identifier
  • Expiration (exp): Short-lived tokens for security
  • Compatibility

  • Minimum n8n version: 1.85.0
  • Node API version: 1
  • Usage

    QR Code Generation

    1. Select Resource: Asset
    2. Select Operation: Generate QR Code
    3. Enter the content to encode (URL, text, etc.)
    4. Choose output format (Base64 or File)
    5. Optionally add a logo from URL or base64
    6. Customize QR code color

    Basic Document Generation

    1. Select Resource: Document
    2. Select Operation: Generate
    3. Choose your template from the dropdown
    4. Provide JSON data to merge with the template
    5. Select output format (Base64, URL, Viewer, or File)

    HTML to PDF Conversion

    1. Select Resource: Conversion
    2. Select Operation: HTML to PDF
    3. Enter your HTML content
    4. Configure paper size and orientation
    5. Specify filename and output format

    E-Invoice Generation

    1. Select Resource: E-Invoice
    2. Run Get Schema once to see the payload structure (Peppol BIS Billing 3.0 UBL, rooted at ubl:Invoice)
    3. Select Create E-Invoice, Create XRechnung E-Invoice or Create Factur-X E-Invoice
    4. Provide the invoice JSON in Invoice Data
    5. For Factur-X, choose a template whose fields are mapped to UBL element names (for example {cbc:ID}), and pick a Profile. The default Basic profile drops item level detail, so use EN 16931 or Extended when lines carry extra attributes
    6. The XML or PDF is attached as binary data, ready for an email or upload node

    XRechnung is the strictest option: the seller contact (BG-6) and a buyer reference (BT-10) are mandatory, and a missing element fails with the rule ID in the error message.

    PDF Processing

  • Watermarking: Add text or image watermarks with positioning options
  • Encryption: Protect PDFs with owner and user passwords
  • Decryption: Remove password protection from encrypted PDFs
  • Optimization: Reduce file size while maintaining quality
  • Form Fields: Extract form field metadata and fill PDF forms with data
  • #### Form Fields Operations
    1. Extract Form Fields: Analyze PDF forms to discover available fields
    2. Fill Form Fields: Populate PDF forms with data

    Example form data:

    {
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com",
      "subscribe": true
    }
    

    Output Formats

  • Base64: Returns PDF as base64 encoded string in JSON
  • URL: Returns download URL (files stored for 30 days)
  • Viewer: Returns viewer URL for viewing/downloading (files stored for 30 days)
  • File: Returns binary PDF data for direct download
  • Supported Document Formats

  • PDF: Full-featured PDF documents
  • HTML: HTML documents for web display
  • Error Handling

    The node includes comprehensive error handling for:

  • Authentication failures
  • Invalid template configurations
  • Missing required parameters
  • API rate limiting
  • Network connectivity issues
  • For workflows that should continue on errors, enable “Continue on Fail” in node settings.

    Resources

  • n8n community nodes documentation
  • PDF Generator API Documentation
  • PDF Generator API Support
  • Template Editor Guide
  • Expression Language Documentation
  • Development

    npm ci
    npm run hooks:install   # once per clone, runs npm run check before every commit
    npm run check           # build, unit tests, lint and n8n's scanner lint
    
  • npm test builds the node and runs the unit tests in test/. They run the node against a fake n8n context, so no API credentials are needed.
  • npm run lint:n8n runs the lint checks of n8n’s community package scanner (@n8n/scan-community-package), which n8n runs on every published version of a verified node. The scanner is installed separately in tools/n8n-scan.
  • Releases are published by the GitHub Actions workflow when a version tag is pushed: bump version in package.json, merge to master, then push a tag with the same version, for example git tag 0.5.1 && git push origin 0.5.1.
  • Version history

    0.5.1

  • ๐Ÿ”ง Improved: Passes n8n’s community package scanner, required for verified nodes
  • – Requests use httpRequestWithAuthentication instead of the deprecated requestWithAuthentication
    – Output items keep their link to the input item (pairedItem)
    – The credentials have an icon

  • ๐Ÿ› Fixed: Error messages from the API are shown for file outputs too, not only the HTTP status
  • ๐Ÿ› Fixed: Workspace Delete returns a success item instead of failing on an empty response
  • ๐Ÿ”ง Breaking: Requires n8n 1.85.0 or later
  • ๐Ÿงช New: Unit tests and a pre-commit hook that runs the same checks as the publish workflow
  • 0.5.0

  • New: Added E-Invoice resource
  • – Create E-Invoice (EN 16931, UBL or CII), Create Factur-X E-Invoice, Create XRechnung E-Invoice, Get Schema
    – Base64 and file outputs attach the document as binary data
    – API validation messages are surfaced in the node error instead of a generic HTTP status text

    0.4.0

  • New: Added Asset resource with QR code generation
  • – Generate QR codes with customizable colors
    – Optional logo overlay support (URL or base64)
    – Base64 and file output formats

  • New: Added “Get Template Schema” operation to Template resource
  • – Returns Template JSON Schema for validation

  • New: Added “Viewer” output format for document generation
  • – Available for all document generation operations (sync, async, batch)
    – Returns viewer URL for viewing/downloading PDFs
    – Files stored for 30 days like URL format

  • ๐Ÿ”ง Improved: Enhanced output format descriptions and help text
  • 0.3.0

  • ๐Ÿ”ง Breaking: Removed ZIP and XLSX format support
  • ๐Ÿ› Fixed: Parameter name collisions that caused UI issues with action generation
  • ๐Ÿ”ง Improved: File response handling
  • โœจ New: JSON parsing helper with consistent error handling across all user inputs
  • ๐Ÿ› Fixed: MIME type mappings for proper file downloads (PDF, HTML)
  • ๐Ÿ› Fixed: Resource/operation parameter extraction for proper n8n batch processing
  • ๐Ÿ”ง Improved: PDF optimization stats
  • ๐Ÿ›ก๏ธ Security: Enhanced input validation and error messaging
  • 0.2.5 & 0.2.6

  • ๐Ÿงน Improved: Removed debug code
  • ๐Ÿ“ฆ Optimized: Improved credentials logic
  • 0.2.3 & 0.2.4

  • ๐Ÿงน Cleanup: Removed external dependencies
  • 0.2.2

  • ๐Ÿงน Cleanup: Removed example nodes and credentials from package
  • ๐Ÿ”ง Improved: Build process now only includes production files
  • ๐Ÿ“ฆ Optimized: Package structure for better n8n compatibility
  • 0.2.1

  • ๐Ÿ› Fixed: Fixed npm publish script in package.json
  • ๐Ÿ“ Updated: Package metadata and repository information
  • 0.2.0

  • โœจ New: Added PDF form fields operations
  • – Extract Form Fields: Analyze and extract form field metadata
    – Fill Form Fields: Populate PDF forms with data

  • ๐Ÿ› Fixed: Improved error handling for PDF services operations
  • ๐Ÿ“ Docs: Enhanced documentation and examples
  • 0.1.0

  • ๐ŸŽ‰ Initial Release: Complete PDF Generator API integration

– Document generation from templates
– HTML/URL to PDF conversion
– PDF processing (watermark, encrypt, decrypt, optimize)
– Template and workspace management
– Support for all output formats (Base64, URL, File)
– Comprehensive error handling and validation