How to...

General questions

Phantom pdf recipe

Licensing and payments

Update existing jsreport server to the latest version

# install helpful tool to check the latest versions
npm install -g npm-check-updates
# check the latest versions of jsreport and additional extensions
# update package.json
ncu -u
# install the latest versions
npm install

Deploy to production

The simplest way to deploy local instance to the production is to compress the whole application folder, upload it to the server and decompress. You can even simply attach the node executable to the compressed package if you don't have node.js installed on the production server. Such package should be able to run without other dependencies installed. This approach should work as long as you have the same OS architecture on the local and the production.

The other options are to run install through npm on the production server and then just copy the templates.

The most complex and powerful approach is to set up an image through docker for example.

Migrate templates from the test to the production server

jsreport stores by default templates in the application\data folder. To migrate templates you can just grab content of this folder and copy it to the production server.

Run jsreport on different port

You need to open prod.config.json file and edit httpPort property to desired value. For details please explore configuration documentation.

Increase performance

jsreport uses by default dedicated processes for rendering pdf or scripts. This solution works better in some cloud and corporate environments with proxies. However for other cases it is better to reuse phantomjs and nodejs workers over multiple requests.

Open prod.config.json and update following:

"phantom": {     
    "strategy": "phantom-server"
"tasks": {       
    "strategy": "http-server"

See configuration documentation for details.

Windows path too long 256 characters limitation

Windows has limitation for maximum file path set to 256 characters and this doesn't play well with nested paths used by older NPM versions. To make sure the windows deployment plays well please do update NPM to the latest release 3.

npm update npm

National characters are not displayed properly

You need to add proper charset to the html head meta:

    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">

For details check National characters section in the documentation.

Highcharts are not printed into pdf properly

Highcharts are using complex animations by default preventing proper pdf printing. To go through it you need to disable highcharts animation like shown on playground example.

How to apply license key

You can choose one from the options below:

  1. The license key can be saved into the application working directory or data folder as license-key.txt
  2. Filled in the configuration file in the property license-key
  3. Passed in the command line parameter as --license-key=xxx
  4. Set in the environment variable as license-key

Make sure to remove all the white spaces around the key.

Update payment details

jsreport enterprise or jsreportonline subscribers can update the payment details in the following way.

  1. Open your gumroad account
  2. Login through the email you filled during the initial subscription. It is the same email your receipts are being sent to.
  3. Choose My account/Settings in the menu
  4. Select Use different card and update the account details