@neayi/n8n-nodes-pandoc
v0.1.1
Published
n8n node to invoke Pandoc for document conversion
Maintainers
Readme
n8n-nodes-pandoc
This package provides an n8n node for using Pandoc to convert documents between different formats.
Installation
Installation in n8n
- Go to your n8n instance settings
- Navigate to "Community Nodes"
- Click "Install"
- Enter
@neayi/n8n-nodes-pandoc
Prerequisites
Important: Pandoc must be installed on the system where n8n is running.
Installing Pandoc in Docker
To install Pandoc in n8n on Docker:
FROM docker.n8n.io/n8nio/n8n
USER root
# Download and install static pandoc binary
# Using a multi-stage build approach with Alpine to download
FROM alpine:latest AS downloader
RUN apk add --no-cache wget tar jq && \
PANDOC_VERSION=$(wget -qO- https://api.github.com/repos/jgm/pandoc/releases/latest | jq -r '.tag_name') && \
wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz && \
tar xvzf pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz --strip-components 1 -C /usr/local/
# Final image
FROM docker.n8n.io/n8nio/n8n
USER root
# Copy pandoc binary from downloader stage
COPY --from=downloader /usr/local/bin/pandoc /usr/local/bin/pandoc
USER nodeUsage
Main Parameters
Input Type
- Binary Data: Uses a binary file from a previous node
- Text: Uses plain text directly from a parameter
Supported Formats
Input Formats:
- Markdown (Pandoc, GFM, CommonMark, strict, PHP Extra)
- HTML
- LaTeX
- DocBook
- DOCX
- ODT
- EPUB
- MediaWiki
- DokuWiki
- Org-mode
- reStructuredText
- Textile
- Jupyter Notebook
- And many more...
Output Formats:
- HTML (4, 5)
- Markdown (various variants)
- LaTeX
- PDF (requires a PDF engine like XeLaTeX)
- DOCX
- ODT
- EPUB (2, 3)
- MediaWiki
- PowerPoint (PPTX)
- Plain Text
- And many more...
Output Type
- Binary Data: Produces a binary file (useful for PDF, DOCX, etc.)
- Text: Returns the converted text in JSON
Additional Options
- Standalone: Produces a complete document with header and footer
- Table of Contents: Includes a table of contents
- Number Sections: Numbers the sections
- Self Contained: Produces a self-contained document (embedded images and CSS)
- Wrap: Line wrapping mode (auto, none, preserve)
- Columns: Column width for line wrapping
- Custom Pandoc Arguments: Custom arguments for Pandoc (useful for example when converting from Markdown to Mediawiki, use :
-f markdown-auto_identifiers --wrap=preserve)
Configuration for your instance
For your instance at https://n8n.dev.tripleperformance.fr/, make sure that:
- Pandoc is installed in the Docker container
- The package is installed via npm in the container
- n8n has been restarted after installation
Development
Build
npm install
npm run buildLint
npm run lint
npm run lintfix # To automatically fix issuesFormat
npm run formatLicense
MIT
Support
For issues and questions:
- Create an issue on GitHub: https://github.com/neayi/n8n_pandoc/issues
- Check the Pandoc documentation: https://pandoc.org/
Links
- GitHub : https://github.com/neayi/n8n_pandoc
- npm : https://www.npmjs.com/package/@neayi/n8n-nodes-pandoc
Contributors
Developped by Neayi for Triple Performance
