Page 1 of 1

sending a page to the printer withoug pressing the printer b

Posted: Sun Jan 16, 2005 3:30 am
by pelegk2
i want to print pages to the printer
withought the need to press on the printer
i wantto give the user list of printer in the network
he chooses the printer and i send it to the selected printer with the selected file (an html file for example)
is it possible?
thnaks in advance
peleg

Posted: Sun Jan 16, 2005 7:17 am
by JAM
If you feel like experiencing the ongoing developing cvs tree of php you'd find the printer functions.

There are some usercomments on those pages that might be of interest.

Posted: Sun Jan 16, 2005 10:06 am
by JAM
viewtopic.php?t=26773&highlight=RTFM
Did you read the others posts?

JAM i didnt doble post!!!!

Posted: Mon Jan 17, 2005 12:17 am
by pelegk2
and what iasked for is no thee printer functions but is there a way to print a file and that it will feet the an A4 page!

Re: JAM i didnt doble post!!!!

Posted: Mon Jan 17, 2005 5:51 am
by JAM
pelegk2 wrote:and what iasked for is no thee printer functions but is there a way to print a file and that it will feet the an A4 page!
Sorry, my bad. What I really meant was; did you noticed their (in the other thread) links to the php manual? You should give it a try to look at it as most things might be obvious...
pelegk2 wrote:...i wantto give the user list of printer in the network...
http://www.php.net/manual/en/function.printer-list.php

Gather printer names with the function, and display them on the page of choise, preferably using <select>...

I'm however not sure that you would be able to send a pdf or doc to the printer as is, without converting it to PCL standards, text, RAW or whatever. And that is not fun i gather.
If it's like your example, an html file) you "should" be able to read the file into a buffer at text, use strip_tags on it (among other things) and then throw the buffer out to the printer.