select printer and print html page, without prompt.

Hello all,

I have a big dificulty with printing issue. I allready search the net but the answers i saw can't seem to get it right..
This is for an intranet made in php and works with MsSql. Its not for outside www.
I need to print directly to a network printer an html page without the prompt window, and i need to select the printer.
This can be done from the server side, doesn´t have to be on the client side.

Can anyone give me a good example? I code php but i never worked with php printer functions, and i don't know if works right and if the html code is processed or it just sends text and tags to printer(prints the code instead of the html layout page)

thx in advanced
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

what difficulties are you having?

Have you actually looked at the manual
justaphaseAuthor Commented:
$handle = printer_open("HP Deskjet 930c");

echo $handle;

Fatal error: Call to undefined function: printer_open() in /home1/acidados/conta/ on line 2

i guess i have to install something on my linux webserver right?
yes right, Call to undefined function means that function is not available, typically this means the extension has not been enabled.

However, the manual says the printr functions are only available under windows:-

Please read the user comments at the bottom of that page for possible solutions to this problem
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

justaphaseAuthor Commented:
in that user comment says the printing is done by line of command with the command lpr... meaning that it will print plain text only right? :( The html wil be printed as code, with the tags and everything :(
their are a few user comments and Ive not read them all, if your wanting to print HTML documents as they appear I would look into how you print via the command line on your linux machine, you can then use that through PHP somehow using one of either exec() or system() or something like that
justaphaseAuthor Commented:
via command linux line? i dont find any command in linux to do that? to render a html file to a printer? don't think so...
justaphaseAuthor Commented:
sorry... its "via linux command line?"... bad sentence..
you can print just about any file in linux including HTML, whether it be from a web bowser or through a desktop environment they will all use a linux application that can also be run from a console, however, if your machine is setup to act as a web server it probably will not have printing capabilities.

I dont know what linux version you use but GNOME usually comes with cups installed by default

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.