-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
I am attempting to use the Export to PDF. I am able to get it to work on the site, however, when I copy the example from http://ui-grid.info/docs/#/tutorial/206_exporting_data and export to PDF I receive an "Access is denied" error message. The only changes that I made to the tutorial was to remove touch and animate.
I traced the error to pdfmake.js. In the Document.portotype.open the win.location.href = result; is where the error happens. I found something that is close to the issue, this question uses iframes, http://stackoverflow.com/questions/1886547/access-is-denied-javascript-error-when-trying-to-access-the-document-object-of. Normally I would contact the creators of pdfmake except I am able to get the PDF to work on your site.
To try to fix the issue I copied the result string for the PDF and tried a window open in some test code. I tried the solution in the SO post, but modified from an iframe to a window. I also tried opening without a new tab in JS.
Do you have an update for the 206 tutorial that is closer to the demo on your site or is the tutorial already up to date?
If the tutorial is up to date, was there anything done special, either to pdfmake or your code that is not in the tutorial, to help get this to work?
Please let me know if you need any more information.