Print a php page to a specific printer

Asked

Viewed 29 times

0

I have a php system that needs to print a page on a specific printer ,my computer has several printer as I can do this,some other language I can use with php to perform this process ??

  • 1

    It is impossible, this is not done in PHP, PHP is on the server and not on the user’s machine ... what makes printing is the front end, in the case of Javascript, but Javascript is limited to this, you only have the window.print();, is likely to never release such a resource on JS as this would imply user/equipment safety.

  • has some way to implement other language in php or plugin anything that helps me choose a specific printer .

  • 1

    No, it’s impossible, there used to be Applets (written in Java), but this type of feature controls the user’s equipment, this is totally unsafe, so modern browsers have removed support for Applets. Note that even changing language about PHP, will not work, the question is not a problem in PHP, the question is CLIENT and SERVER, if the server could control the user’s machine (type select a printer desired) this could be used for EVIL and we would have several attacks, use the internet would be impossible.

  • 1

    You don’t have to choose the right technology to solve the problem you have. Browsers don’t fit this need and PHP essentially only works by providing pages to them. Almost every application in the world should be native for countless reasons, but for some reason people think that everything can be solved by the web, when in fact it only solves one thing, one doesn’t need to install anything on their machine, obviously accepting all the disadvantages that this brings.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.