opening the results in new window is not working in IE 11



  • when i open the result in new window using the below code it work fine in chrome and firefox,

    **jsreport.renderAsync(request).then(function(res) {
    console.log(res);

    //open in new window
    window.open(res.toDataURI())

    //open download dialog
    res.download('test.pdf')
    });**

    but this is not working in IE in my case it is IE 11,

    please help on how to handle this in IE



  • Did you check the console in the F12 tools?
    There is clearly written that this browser doesn't support the promises and you need to link to the page a custom implementation like a Bluebird.

    This should be enough

    <script src='https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.5.0/bluebird.js'></script>
    Hello wolrd
    
    <script>
        jsreport.renderAsync({
            template: {
                content: 'foo',
                engine: 'none',
                recipe: 'phantom-pdf'
            }
        }).then(function (r) { 
            r.download('foo.pdf')
        })
    </script>
    


  • thanks for the replay, i have done the same thing.


Log in to reply
 

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