Hello,
We are trying to export our grid data to pdf file:
toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'Grid_pdfexport') {
this.grid.pdfExport();
} else if (args.item.id === 'Grid_excelexport') {
this.grid.excelExport();
} else if (args.item.id === this.filterKey) {
this.filter.emit(args.item.id);
}
}
pdfExport is what Syncfusion provide from the grid
/**
* Export Grid data to PDF document.
* @param {pdfExportProperties} PdfExportProperties - Defines the export properties of the Grid.
* @param {isMultipleExport} isMultipleExport - Define to enable multiple export.
* @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.
* @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
* @return {Promise<any>}
*
*/
pdfExport(pdfExportProperties?: PdfExportProperties, isMultipleExport?: boolean, pdfDoc?: Object, isBlob?: boolean): Promise<Object>;
we get the following error:
core.js:7187 ERROR Error: Uncaught (in promise): TypeError: Class constructor PdfDocument cannot be invoked without 'new'
TypeError: Class constructor PdfDocument cannot be invoked without 'new'
at new PdfDocument (ej2-pdf-export.es2015.js:17567)
at ej2-grids.es2015.js:26709
at ZoneDelegate.invoke (zone-evergreen.js:359)
at Object.onInvoke (core.js:30904)
at ZoneDelegate.invoke (zone-evergreen.js:358)
at Zone.run (zone-evergreen.js:124)
at zone-evergreen.js:855
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:30885)
at ZoneDelegate.invokeTask (zone-evergreen.js:390)
at Zone.runTask (zone-evergreen.js:168)
at drainMicroTaskQueue (zone-evergreen.js:559)
at invokeTask (zone-evergreen.js:469)
at ZoneTask.invoke (zone-evergreen.js:454)
at timer (zone-evergreen.js:2650)
at resolvePromise (zone-evergreen.js:797)
at zone-evergreen.js:862
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:30885)
at ZoneDelegate.invokeTask (zone-evergreen.js:390)
at Zone.runTask (zone-evergreen.js:168)
at drainMicroTaskQueue (zone-evergreen.js:559)
at invokeTask (zone-evergreen.js:469)
at ZoneTask.invoke (zone-evergreen.js:454)
at timer (zone-evergreen.js:2650)
I'm just wondering if this is a known issue.
Thanks,
Minh