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 😃
i'm afraid that there is no way to assign functions in a script and be able to call the function in another script, jsreport for security reasons by default execute scripts in another process, functions can't be passed across these processes, however to do what you want you have some options:
store your functions in an asset file and just import the asset in every script where you need your functions, example: https://playground.jsreport.net/studio/workspace/BJP7eMYTe/22
save your functions in a file, and just require that file in your scripts. var functions = require('./path/to/functions.js')
Thanks for the suggestion.
However now I am facing another issue. I am told that, In the server, I can not run npm command at all which means I can not run the "npm install jsreport-wkhtmltopdf" command. Is there any other option available so I can download the server & also enable the wkhtmltopdf extension by not using npm install command mentioned above in the server?