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

PDF Events

1 Answer 61 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Aidan
Top achievements
Rank 1
Aidan asked on 08 Oct 2020, 02:45 PM

I want to bring up the print dialog as soon as the PDF is loaded.

I am using 

pdfViewer.execute({ command: "PrintCommand" });

 which works fine from a button.

However it fails when I use it from the onRender event.

Putting an alert in the event appears to show the event is fired before the PDF is rendered to screen.

Is there another way to do this?

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 13 Oct 2020, 02:47 PM

Hello Aidan,

You can do that on document.ready in a setTimeout function. Here is a small example for reference.

Let me know how that works for you.

Regards,
Martin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
PDFViewer
Asked by
Aidan
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or