How can I print directly to the printer using jasper and grails reports?

Can someone please help me. I am using the grails plugin and jasper grails. I would like to send a jasper report directly to the printer by clicking on my web page. Can someone point me in the right direction?

+4
source share
1 answer

HTML5 does not have a print API. You will always rely on a client browser to do all the printing. The best you can do is open a new browser window to display the report without any of your website header / footer / etc. Add a button with javascript:

window.print(); 

to open the user an OS / Browser print dialog for the user.

+2
source

Source: https://habr.com/ru/post/1310805/


All Articles