Problem with downloading the file.

  • Hi the report is generating correctly but the file doesn't want to download it :(
    what is the problem ?

     <button type="button" onclick="downloadPDF()">Pobierz</button>
     <script src=""></script>
     jsreport.serverUrl = 'http://localhost:5488/'
    function downloadPDF() {
                'template': {
                    'shortid': 'Ngmy7zdGi',
    	            'recipe': 'chrome-pdf'
    			"options": {
    		        	"reports": { "async": true }
               });{ 'shortid': 'Ngmy7zdGi'});


  • Please check the api and example here

    jsreport.serverUrl = ''
    const report = await jsreport.render({
      template: {
        name: 'myTemplate'    
      data: {
        someData: 'hello'
    // download the output to the file'myreport.pdf')

  • Now I see you use the async report rendering (options.reports.async == true). Is this intentional?

    The code from the docs doesn't work for the async reports. You would need to remove the options.reports.async.

    In case you still want to use the async report from the js client, you need to implement the polling as described here on your own.

Log in to reply

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