Single executable not working as shown in the documentation

  • On this page:

    It says that the following command should work:

    jsreport.exe --render request.json --output file.pdf

    but I get

    "Unknown arguments: render, output" when I run it.

  • administrators

    hi! you're right, that page shows an incorrect usage of the executable, the correct command is jsreport.exe render --request request.json --output file.pdf

    i will update that page to show the correct way, thnks for let us know.

  • administrators

    also just FYI that page seems like it has been deprecated (we don't show a link to it anymore) the updated page for the executable documentation is

  • Ahh, thank you, one correction though is that it's

    jsreport.exe render --request request.json --out file.pdf

  • administrators

    ups, you are right! thnks 👍

  • One final question, is it possible to specify in the request.json the name of a template and data file in the directory that the executable is run in. For example I have a report.json data file that should bind to test.html file and I would to put that information in a single request.

  • administrators

    it is not possible when using only the --request option because it would be somehow difficult to difference between real string content and file paths inside the file, but you can use jsreport.exe render --template.content test.html --template.engine handlebars --template.recipe phantom-pdf --data report.json --out file.pdf to do what you want.

    also just FYI you can run jsreport.exe render -h to see some examples about the usage of the command, and descriptions about the options 😃

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.