tcort / wkhtmltox

high performance access to `wkhtmltopdf` and `wkhtmltoimage` from node.js.
61 stars 7 forks source link

quoting --replace value breaks generation #15

Open egorbenko opened 5 years ago

egorbenko commented 5 years ago

When generating PDF file and trying to pass --replace value through options as

{
  replace: "data somedata"
}

which outputs --replace "data somedata" argument and breaks generation

expected output: --replace data somedata

Solution:

https://github.com/tcort/wkhtmltox/blob/master/index.js#L93 do not quote --replace value or provide alternative syntax to include replace option