Send report directly to printer
-
Hi, I tried to use the browser client to load an html template and render it as pdf on my web page. I tried to download pdf file too and everything works fine.
My question is.. is it possible to render pdf report and send it directly to printer from the browser (without load a preview on the page, or maybe loading it, hidden or not, but printing without interaction with the user)?
If isn't possible to get a direct pdf print, could I get this result rendering the report in html format? as an alternative solution..
-
My question is.. is it possible to render pdf report and send it directly to printer from the browser (without load a preview on the page, or maybe loading it, hidden or not, but printing without interaction with the user)?
i think it is not possible. browsers will always show a printer preview and require user to accept it before sending the print action, i think this is a security default.
could I get this result rendering the report in html format? as an alternative solution..
i think both formats will require the user to invoke the print action first, but you can invoke the print action yourself after rendering the report, user will still need to accept it before send it to printer though
-
Just adding here that there is a way how to instruct browser to open print dialog automatically also for pdf. See this demo
https://playground.jsreport.net/studio/workspace/SyuX7ahJe/32