npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-html-to-docx-via-pandoc

v0.2.2

Published

n8n community node to convert HTML to DOCX using a local pandoc executable

Readme

n8n-nodes-html-to-docx-via-pandoc

Convert an HTML string to a DOCX binary using a locally installed pandoc on the worker.

Installation

  • Ensure pandoc is installed and available on PATH on the n8n worker host.
    • macOS: brew install pandoc
    • Ubuntu/Debian: apt-get install pandoc
    • Windows: install from https://pandoc.org/installing.html and ensure pandoc.exe is on PATH
  • Install this community node package into your n8n instance according to n8n docs.

Node options

  • HTML Source: Direct string or JSON field path
  • Output Binary Property: name of the binary property (default data)
  • File Name: output file name (default document.docx)
  • Pandoc Path: path to pandoc executable (default pandoc)
  • Embed Resources: include local resources with --embed-resources --standalone when supported
  • Resource Paths: directories for pandoc to search for resources
  • Reference DOCX Source: None | Filesystem Path | Built-in Minimal Reference
  • Reference DOCX Path: path to a reference DOCX template (when Filesystem Path)
  • Clean Output Mode: enable cleanup (keeps only bold/italic, preserves lists/heading styles, removes bookmarks)
  • Punctuation Normalization: Off | Conservative (default Conservative)
  • Sanitize via CommonMark: Roundtrip to simplify structure
  • Strip Formatting Except Bold/Italic, Remove Bookmarks, Collapse Empty Runs/Paragraphs, Ensure xml:space="preserve"
  • Whitespace Policy: Collapse | Preserve Breaks (matching/sanitization only)
  • Normalization Profile (JSON): advanced profile to share across nodes
  • Timeout: seconds to wait for pandoc
  • Additional Pandoc Arguments: advanced array of extra args (tokens only)

NormalizationProfile

A JSON-serializable structure shared with the DOCX diff node.

Default:

{
  "punctuation": "conservative",
  "whitespacePolicy": "collapse",
  "collapseNBSP": true,
  "normalizeQuotes": true,
  "unicodeNormalization": "NFC"
}

Precedence:

  • If Normalization Profile (JSON) is provided, its fields override defaults.
  • Aggressive punctuation normalization is used for matching only and never mutates output.

Minimal DOCX constraints

When cleanup is enabled, output is sanitized to:

  • Runs: retain only w:b and w:i
  • Paragraph props: retain only w:pStyle and w:numPr
  • Remove bookmarks
  • Collapse empty runs/paragraphs (unless paragraph has pStyle/numPr)

Notes

  • Requires pandoc 2.11+ for --embed-resources. The node will continue without this flag on older versions.
  • For remote resources referenced by HTML, behavior may vary by pandoc setup. Prefer embedding or ensuring resources are available locally.

Development

  • Node >= 20.15
  • Install deps: npm ci
  • Build: npm run build
  • Dev compile: npm run dev
  • Lint: npm run lint
  • Tests:
    • Unit: npm run test:unit
    • Integration: npm run test:integration (requires pandoc installed)

License

MIT