n8n-nodes-pdf2image
v1.0.7
Published
n8n node to convert PDF files to images
Maintainers
Keywords
Readme
PDF to Image Converter Node for n8n
A custom n8n node that converts PDF files to images using the pdf-poppler library.
⚠️ System Requirements
This node requires poppler-utils to be installed on the system where n8n is running.
📖 For detailed installation instructions, see DEPENDENCIES.md
Quick Setup for Different Environments:
Docker (Recommended):
FROM n8nio/n8n:latest
USER root
RUN apk add --no-cache poppler-utils
USER nodeUbuntu/Debian:
sudo apt update && sudo apt install poppler-utilsCentOS/RHEL:
sudo yum install poppler-utilsmacOS:
brew install popplerWindows:
- Download poppler for Windows and add to PATH
- Or use WSL with Ubuntu setup
⚠️ Note: This node will NOT work on n8n Cloud as system dependencies cannot be installed there.
Features
- Convert PDF files to PNG or JPEG images
- Support for all pages or specific page ranges
- Configurable output quality and DPI
- Custom width and height settings
- Binary data handling for seamless n8n integration
Installation
Via n8n Community Nodes (Recommended)
- Go to Settings > Community Nodes in your n8n instance
- Click Install
- Enter:
n8n-nodes-pdf2image - Click Install
- Restart n8n
Manual Installation
- Navigate to your n8n installation directory
- Install the package:
npm install n8n-nodes-pdf2image - Restart n8n
Usage
- Add the "PDF to Image" node to your workflow
- Configure the input PDF binary property name
- Set your desired output format (PNG or JPEG)
- Adjust quality, DPI, and size settings as needed
- Choose to convert all pages or specify a page range
- Set the output binary property name for the converted images
Configuration Options
- PDF Binary Property: Name of the binary property containing the PDF file
- Output Format: PNG or JPEG
- Quality: JPEG quality (1-100, only for JPEG format)
- DPI: Output image resolution (72-600)
- Width/Height: Custom dimensions (optional)
- Convert All Pages: Toggle for all pages vs. specific range
- Page Range: Specify pages like "1-5" or "1,3,5"
- Output Binary Property: Name for the output image binary data
Requirements
- Node.js 18+
- n8n
- Poppler utilities (automatically handled by pdf-poppler)
Development
# Install dependencies
npm install
# Build the project
npm run build
# Watch for changes during development
npm run dev
# Lint the code
npm run lint
# Test package creation
npm packRelease Process
This project features fully automated releases with multiple options:
Option 1: Local Release Script (Recommended)
# Automatically bumps version, commits, tags, and triggers release
.\release.ps1 patch # 1.0.3 → 1.0.4 (bug fixes)
.\release.ps1 minor # 1.0.3 → 1.1.0 (new features)
.\release.ps1 major # 1.0.3 → 2.0.0 (breaking changes)The script automatically:
- ✅ Bumps version in package.json
- ✅ Updates package-lock.json
- ✅ Commits changes with proper message
- ✅ Creates and pushes git tag
- ✅ Triggers automated GitHub release
Option 2: GitHub Manual Release
- Go to GitHub Actions → Manual Release
- Click Run workflow
- Select version type (patch/minor/major)
- Optionally skip npm publish for testing
- Click Run workflow
Option 3: Manual Git Commands
# Only if you need full control
npm version patch
git push origin main --tagsAutomated Pipeline Features
Both release methods trigger the same automated pipeline:
- 🔧 Build & Test: Compiles TypeScript, runs linting
- 📦 Package Validation: Verifies file structure and n8n config
- 🚀 npm Publish: Publishes to npm registry (if NPM_TOKEN configured)
- 📋 GitHub Release: Creates release with changelog and assets
- 📎 Asset Upload: Attaches .tgz package file
Setup Requirements for Automated Releases
NPM Token: Add
NPM_TOKENto GitHub repository secrets- Go to npm.com → Account → Access Tokens
- Create a new "Automation" token
- Add it to GitHub: Settings → Secrets → Actions →
NPM_TOKEN
GitHub Token: Automatically provided by GitHub Actions
🔧 Troubleshooting
Common Issues
Error: "PDF conversion failed: No images were generated"
- Cause: poppler-utils not installed or not accessible
- Solution: Install poppler-utils using the appropriate method for your system
- Verify: Run
pdftoppm --versionin your terminal
Error: "execvp failed, errno = 2 (No such file or directory)"
- Cause: poppler-utils binaries not found in system PATH
- Solution: Ensure poppler-utils is properly installed and accessible
Error: "Command failed: execvp failed... gm identify"
- Cause: Old error from pdf2pic library (should not occur in latest version)
- Solution: Update to latest version of the node
Docker container crashes after installation
- Cause: User permission issues
- Solution: Ensure you switch back to
USER nodeafter installing system packages
Getting Help
- Check DEPENDENCIES.md for detailed installation instructions
- Verify poppler-utils installation:
pdftoppm --version - Check GitHub Issues for similar problems
- Create a new issue with your system details and error message
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
License
MIT
