This is a migrated thread and some comments may be shown as answers.

pdf export complete event

4 Answers 793 Views
PDF Export
This is a migrated thread and some comments may be shown as answers.
Levon
Top achievements
Rank 1
Levon asked on 19 Mar 2020, 10:53 AM

based on given example, is it possible to have an event which will fire when saveAs() done?

 

https://www.telerik.com/kendo-angular-ui/components/pdfexport/multi-page-content/#toc-page-templates

In my project there was a some data fetch from API, and it was take some time. So UI is design to show "Preparing data to be exported" Loading popup.  need to catch the moment when saveAs() completed to hide the loading.

Note that beside the request/response html file preparation and exportation also takes some time. So the opup must be closed right when saveAs() done

4 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 23 Mar 2020, 07:05 AM

Hi Levon,

Thank you for the provided link.

The PDFExport component does not provide means or a specific event for handling the described workflow. However, as it internally uses the capabilities of the Kendo Drawing package, you can break down the process, as described in the following section of our documentation:

https://www.telerik.com/kendo-angular-ui/components/drawing/pdf-output/

The PDFExport export() method returns a Promise with the generated Group as data. This can be used and passed to the exportPDF function alongside the desired PDFOptions.

The following example demonstrates the described approach:

https://stackblitz.com/edit/angular-plugfy-b1dewv?file=app/app.component.ts

I hope this helps.

Regards,
Martin
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Levon
Top achievements
Rank 1
answered on 24 Mar 2020, 08:55 AM

Thank you Martin,

that's what I need.

0
Sam
Top achievements
Rank 1
answered on 06 May 2020, 04:38 AM

I am following same below link but getting error @progress/kendo-drawing/main"' has no exported member 'DrawOptions'.

https://stackblitz.com/edit/angular-plugfy-b1dewv?file=app/app.component.ts

0
Martin
Telerik team
answered on 07 May 2020, 01:39 PM

Hi Sam,

I noticed that you already opened a separate forum thread and additional details are provided for the case:

https://www.telerik.com/forums/export-to-pdf-issue-81d335c5d52d

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
PDF Export
Asked by
Levon
Top achievements
Rank 1
Answers by
Martin
Telerik team
Levon
Top achievements
Rank 1
Sam
Top achievements
Rank 1
Share this question
or