Unplanned
Last Updated: 21 Nov 2019 08:49 by ADMIN
Christian
Created on: 11 Nov 2019 07:28
Category: PDFViewer
Type: Feature Request
0
Toolbar/Print Customizing - Add built-in Print event to PDFViewer component

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

  1. How can i customize the toolbar actions, primary the print action/command? See the dojo link
  2. Is it possible to get the print window result of the pdf viewer?
  3. Is it possoble to call the print command? I tested the execute function, but it doesn't work. I get only an error (this is not an constructor...)
  4. the download function download every time a document.pdf, the assigned name is ignored

https://dojo.telerik.com/EmErekOB

 

Regards

Christian

5 comments
ADMIN
Misho
Posted on: 21 Nov 2019 08:49

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Christian
Posted on: 20 Nov 2019 10:40

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

ADMIN
Misho
Posted on: 13 Nov 2019 14:06

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Christian
Posted on: 13 Nov 2019 07:09

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

ADMIN
Misho
Posted on: 11 Nov 2019 13:59

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.