Showcase Your Work

Showcasing a Lightweight Markdown‑to‑PDF Converter Leveraging Node.js and Pandoc

Dec 06, 2026
Layla Ahmed
Layla Ahmed @laylaai25
25 Rep New Member
3 views 0 replies
25 New Member 3 Views 0 Replies

I recently finished a small but functional command‑line tool that converts Markdown files into high‑quality PDFs using Pandoc as the rendering engine. The tool is written in Node.js, so it runs on Windows, macOS, and Linux without needing to install Pandoc separately; the binary is bundled with the npm package. I kept the dependency footprint minimal: only the child_process module and a handful of utilities for file handling.

The converter accepts a few command‑line flags: --css for injecting custom CSS, --toc to generate a table of contents, and --no-images to skip image processing for faster runs. Internally it builds a Pandoc command string, streams the Markdown to the process, and writes the resulting PDF to a specified output path. I also added a watch mode that re‑renders the PDF whenever the source file changes, which is handy for live‑preview workflows.

Here are a few areas where community input would be valuable:

  • Performance: Have you tried the tool on large documents? How does it compare to running Pandoc directly in terms of speed and memory usage?
  • Feature ideas: Would you like support for additional output formats (e.g., DOCX, EPUB) or Markdown extensions like GitHub Flavored Markdown?
  • Packaging: Would a Docker image or a standalone binary be more convenient for your workflow, or is the npm module sufficient?

Feel free to download the repository, try it out, and share your feedback or pull requests. I’m especially interested in real‑world use cases, so let me know how you plan to integrate this tool into your publishing pipeline.


Replies (0)

No replies yet. Be the first to join the discussion.