Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Specify path to pandoc command in OS #4

merged 2 commits into from

2 participants


Thanks for good wrapper. I found, it is very useful to specify path to pandoc runner from node.
I hope it will useful for someone else.


@pvorb pvorb merged commit 74966b8 into pvorb:master

Maybe it's a time to release 0.1.3? ;)


I just published v0.2.0. It's already on npm. See the README for more info. (Existing code will still work)


Great update, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 1 deletion.
  1. +11 −0
  2. +4 −1 pandoc.js
@@ -48,6 +48,17 @@ pandoc(src, from, to[, options], callback);
arguments `(err, result)`, where `err` is an error or `null` and `result` is
a string containing the converted text.
+By default, it uses pandoc command installed to your system.
+To use custom runner change `pandoc.path`.
+var join = require('path').join;
+var pandoc = require('pdc');
+pandoc.path = join(process.env.HOME, '.cabal/bin/pandoc');
+pandoc('# Heading', 'markdown', 'html');
## Bugs and Issues
If you encounter any bugs or issues, feel free to open an issue at
5 pandoc.js
@@ -12,7 +12,7 @@ function pdc(src, from, to, opt, cb) {
if (typeof opt == 'object')
args = args.concat(opt);
- var pandoc = spawn('pandoc', args);
+ var pandoc = spawn(pdc.path, args);
var result = '';
var error = '';
@@ -39,3 +39,6 @@ function pdc(src, from, to, opt, cb) {
pandoc.stdin.end(src, 'utf8');
+// Path to pandoc runner in your system
+pdc.path = 'pandoc';
Something went wrong with that request. Please try again.