Murugan.P
Murugan.P

Reputation: 345

How to print using print.js in ionic application without opening printer setup page

We are developing ionic web application with printer functionality. We used Print.js npm to print the content. There is a page open in browser when we call print method. We can see the information like printer name, no.of pages and so on. Our requirement is to print the content without showing that setup page ionic application.

Upvotes: 1

Views: 742

Answers (1)

crabbly
crabbly

Reputation: 5186

This can't be done with Javascript alone. One of the reasons is for our own security. Imagine if you open a webpage, and it starts printing lots of page without any warning. That wouldn't be a good thing.Another reason is to allow the user to confirm / select the printer where the job will be sent to.

Ref: https://github.com/crabbly/Print.js/issues/130

Upvotes: 1

Related Questions