diff --git a/index.js b/index.js index 5fba4b1..0f96b3d 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,7 @@ function markdownpdf (opts) { htmlToTmpHtmlFile.on('finish', function () { // Invoke phantom to generate the PDF var childArgs = [ - path.join(__dirname, 'phantom', 'render.js'), + path.join(opts.cwd, 'phantom', 'render.js'), tmpHtmlPath, tmpPdfPath, opts.cwd,