We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PDFExport fails for Angular Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

145668 Jul 3,2019 04:56 AM UTC Jul 4,2019 01:42 PM UTC Angular - EJ 2 1
loading
Tags: Grid
Minh
Asked On July 3, 2019 04:56 AM UTC

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

Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 4, 2019 01:42 PM UTC

Hi Minh, 
 
Greetings from Syncfusion support. 
 
We have considered “Super constructor may only be called once exception is thrown when the PdfDocument is initialized” as a defect and logged a report for the same. We will include the fix in our patch release which is expected to be rolled out by mid of July 2019. Until then we appreciate your patience.  
 
Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon