is there a way to print in Vue.js without popping up the print dialog. Currently I am using the solution window.print and I have enabled kiosk in chrome. Now I also get stuck on any solutions. What possible solutions are there for Vue.js?
Asked
Active
Viewed 982 times
0
-
No. This has nothing to do with Vue.js; browsers will always show the dialog. Consider that a user has to choose which printer to use, whether the printing should be double-sided, what paper tray to use, etc. – Pointy May 27 '21 at 14:34
-
Does this answer your question? ["Silent" Printing in a Web Application](https://stackoverflow.com/questions/21908/silent-printing-in-a-web-application) – Alexander Santos May 27 '21 at 14:35
-
Alright maybe it's my English. What I meant to ask is what kind of solution are there for not showing the print dialog. For example I could also build a .net application for handling printing. But I am curious what kind of solutions other programmers have used to handle this issue. – Yannic Hamers May 27 '21 at 14:37
-
In Kiosk mode in particular, it seems there's a way to do it: https://windowsreport.com/chrome-system-print-dialog/ — however that will only be useful if your application is running on a system that is basically a kiosk, with a fixed printer setup. – Pointy May 27 '21 at 14:37
-
For *general* (not Kiosk) web application purposes, it is not possible. That Chrome feature is just that, a Chrome feature. However that may be OK for your purposes. – Pointy May 27 '21 at 14:38
-
What do you think about building an electron shell? Using framework Electron. Could this be a problem solver – Yannic Hamers May 27 '21 at 14:40
-
I don't know enough about electron to say. You didn't describe the nature of your application; if it is *something* like electron, intended as a "desktop application" and not a "web application", then that "--kiosk-printing" option described in that linked article might work. – Pointy May 27 '21 at 14:45
-
my application is lightweighted. It is actually a web application but it can be used as a desktop app. In the end it will still run in the browser so the print Dialog will pop up. I have found one article that could be really interesting. But it's not easy to understand while I have not yet worked with electron and I have only one week to solve the problem for the Vue.js application. https://programmer.group/electronic-vue-silent-printing-2019-latest-solution-including-source-code.html – Yannic Hamers May 27 '21 at 14:55
1 Answers
0
you may use it, printing without print dialog https://github.com/Imfdj/electron-vue-printer#readme
-
1Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 26 '22 at 12:59