diff --git a/misc/tutorial/206_exporting_data.ngdoc b/misc/tutorial/206_exporting_data.ngdoc index 1daedb0328..dbcbf623fb 100644 --- a/misc/tutorial/206_exporting_data.ngdoc +++ b/misc/tutorial/206_exporting_data.ngdoc @@ -16,6 +16,10 @@ the grid menu using the gridOption `enableGridMenu` Note that the option to export selected data is only visible if you have data selected. +If you are using internet explorer then the pdf will automatically download rather than opening, +there are issues with pdfMake not being able to automatically open tabs in internet explorer +(refer https://github.com/bpampuch/pdfmake/issues/16 and other issues in that repo). + @example In this example we use the native grid menu buttons, and we show both the pdf and csv export options. diff --git a/src/features/exporter/js/exporter.js b/src/features/exporter/js/exporter.js index dbe655367b..3c0ce0a9c2 100644 --- a/src/features/exporter/js/exporter.js +++ b/src/features/exporter/js/exporter.js @@ -842,7 +842,11 @@ var exportData = this.getData(grid, rowTypes, colTypes); var docDefinition = this.prepareAsPdf(grid, exportColumnHeaders, exportData); - pdfMake.createPdf(docDefinition).open(); + if (this.isIE()) { + pdfMake.createPdf(docDefinition).download(); + } else { + pdfMake.createPdf(docDefinition).open(); + } },