@kukhta_stepan/n8n-nodes-pdf-to-images
v1.0.9
Published
n8n community node: PDF binary → JPEG/PNG per page (Mozilla PDF.js + @napi-rs/canvas, no MuPDF/Poppler)
Downloads
815
Maintainers
Readme
@kukhta_stepan/n8n-nodes-pdf-to-images
Professional n8n community node for document/image conversion to raster output, powered by pdfjs-dist and @napi-rs/canvas (no MuPDF or Poppler required).
What This Node Does
The node supports three practical workflows:
- PDF -> JPG/PNG (page-by-page)
- RTF -> JPG/PNG (page-by-page)
- Image -> JPG (for PNG/JPEG/GIF/WebP/BMP inputs)
Node Details
- Display name:
PDF to Images - Node name:
pdfToImagesPdfJs - Type version:
3 - Input: binary data field (configured by
Binary Field Name) - Output: one or more items with generated image binaries plus metadata in
json
Operations
1) PDF/RTF -> images (each page)
This is the main operation for document conversion.
- Input type is auto-detected inside this mode:
%PDF-signature -> handled as PDF{\rtfsignature -> handled as RTF
- Output format:
JPEG(smaller files)PNG(lossless)
DPIcontrols page render scale and output size.
If the file is neither valid PDF nor RTF, the node returns a clear validation error.
2) Image -> JPEG
Converts one raster image to one JPEG image.
- Supported inputs: PNG, JPEG, GIF, WebP, BMP
- Useful for
PNG -> JPGnormalization before OCR/storage pipelines.
Output Metadata
For each produced image item, json includes:
conversionModesourceType(pdf,rtf, orimage)page,totalPagesfileName,format,dpi(when applicable)width,heightbinaryKey,binaryField,binaryPrefix,binaryPageIndex
Binary Field Naming Rules
Output Binary Field (prefix) controls output key naming in item.binary.
Prefix is set
Keys are always indexed:{prefix}0,{prefix}1,{prefix}2, ...Prefix is empty
The node preserves the resolved input binary field name (per item). Fallback order:- Resolved
Binary Field Namevalue $json.binaryPropertyNamedata
- Resolved
For multi-page PDF/RTF with empty prefix:
- page 1 keeps the original name, e.g.
data0 - next pages use suffix with underscore:
data0_1,data0_2, ...
This avoids accidental renaming like data0 -> data00.
Install in n8n
- Open Settings -> Community nodes -> Install
- Install package:
@kukhta_stepan/n8n-nodes-pdf-to-images
- Reload n8n if prompted
Self-hosted environments must allow community packages (for example N8N_COMMUNITY_PACKAGES_ENABLED).
Local Development
npm install
npm run buildPublish (Maintainers)
npm login
npm version patch
npm publish --access publicNotes:
- package is scoped, so
--access publicis required prepackrunsnpm run buildautomatically
License
MIT
