saveAs callback

4 posts, 1 answers
  1. Nisarg
    Nisarg avatar
    25 posts
    Member since:
    Jan 2015

    Posted 06 Feb Link to this post

    Hi there,

    I am using this method 'kendo.drawing.pdf.saveAs' to export pdf. Is there a callback or a promise in this method. Or is there a way to know when the download is accepted or canceled by the user?

    Thanks in advance!

  2. Eduardo Serra
    Admin
    Eduardo Serra avatar
    96 posts

    Posted 06 Feb Link to this post

    Hello Nisarg,

    We can use the method you describe as follows:

    drawing.pdf.saveAs(group, "filename.pdf", proxyUrl, callback);

    where the proxyUrl and callback arguments are optional; the callback will be invoked when the file has been successfully generated (generation could be asynchronous).

    I hope this helps!

    Regards,
    Eduardo Serra
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Nisarg
    Nisarg avatar
    25 posts
    Member since:
    Jan 2015

    Posted 06 Feb Link to this post

    the callback will be invoked when the file has been successfully generated (generation could be asynchronous).

    So you mean that I cannot be sure if the user has closed the download prompt?

    The reason that I need this callback is because I am exporting the pdf from a new tab, and when the download is done, I want to close the tab automatically.

    Will the callback satisfy this functionality?

  4. Answer
    Eduardo Serra
    Admin
    Eduardo Serra avatar
    96 posts

    Posted 07 Feb Link to this post

    Hello Nisarg,

    Although every application is different, I think from what you describe that the callback will satisfy your needs and allow you to know when to close the tab.

    If you find trouble during the implementation of this feature, reply back in a new forum thread and we will help you.

    Thank you.

    Regards,
    Eduardo Serra
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top