wkhtmltopdf(markup, fOut, opts, on_error) {
    // Save the markup to a temporary file
    const tempFile = fOut.replace(/\.pdf$/i, '.pdf.html');
    FS.writeFileSync(tempFile, markup, 'utf8');

    // Prepare wkhtmltopdf arguments.
    let wkopts = _.extend({'margin-top': '10mm', 'margin-bottom': '10mm'}, opts.wkhtmltopdf);
    wkopts = _.flatten(_.map(wkopts, (v, k) => [`--${k}`, v]));
    const wkargs = wkopts.concat([ tempFile, fOut  ]);

    SPAWN('wkhtmltopdf', wkargs , false, on_error, this);
  }
Generate a PDF from HTML using wkhtmltopdf's CLI interface.
  Spawns a child process with `wkhtmltopdf <source> <target>`. wkhtmltopdf
  must be installed and path-accessible.
  TODO: If HTML generation has run, reuse that output
  TODO: Local web server to ease wkhtmltopdf rendering