Hi,
i tested the updated pdfviewer of version 2019.3.1023, but it did not work as expected.
I have some questions about usage und customizing
https://dojo.telerik.com/EmErekOB
Regards
Christian
Hi,
I'm marking this thread as an approved public feature request so it will be visible in ProgressĀ® Kendo UIĀ® for jQuery Feedback Portal so you could track its status and vote for raising its priority for future implementation:
https://feedback.telerik.com/aspnet-mvc/1441575-toolbar-print-customizing
Best Regards,
Misho
Progress Telerik
Hi,
A custom command is not an option. This may work now, but work this solution with the coming releases, when the pdf viewer was updated?
Is there a build in event handler planned or can i get access to the opened print window?
Regards
Christian
Hi,
Since PDFViewer uses the built in browser dialog you could consider creating a custom print command which attaches a handler to afterprint event which is raised after the user prints, or if they abort the print dialog:
https://dojo.telerik.com/AferICUW/2
https://developer.mozilla.org/en-US/docs/Web/API/Window/afterprint_event
From the information came upon, however, I couldn't find a way to distinguish the print click from the cancel click.
I hope you will find this information useful.
Best Regards,
Misho
Progress Telerik
Hi Misho,
thanks for the sample :)
@2
I want to call a function after the print dialog, if possible after the print click and not the cancel click.
Regards
Christian
Hello,
Thank you for contacting us and sharing your feedback about the PDFViewer widget. The following help article demonstrates how you could customize toolbar tools:
https://docs.telerik.com/kendo-ui/controls/PDF/PDFViewer/toolbar#toolbar-and-tools
https://dojo.telerik.com/ipOTeYOc/3
You could control the PDFCiewer tools through the toolbar.items collection:
https://docs.telerik.com/kendo-ui/api/javascript/ui/pdfviewer/configuration/toolbar.items
You could find customized Print command on the following dojo:
https://dojo.telerik.com/ipOTeYOc/6
To call the print command you can use the execute method: https://docs.telerik.com/kendo-ui/api/javascript/ui/pdfviewer/methods/execute
You could use the following command for the PDF command:
$("#pdfViewer").data("kendoPDFViewer").execute({command: "PrintCommand"});
The Download default document name could be controlled through messages.defaultfilename
https://docs.telerik.com/kendo-ui/api/javascript/ui/pdfviewer/configuration/messages.defaultfilename
https://dojo.telerik.com/ipOTeYOc/7
Regarding your second question, the PDF viewer converts the PDF into an image before sending to the Print dialog, could you give us more details about that requirement so we will do our best to try to find a solution?
Best Regards,
Misho
Progress Telerik