Forum Moderators: coopster

Message Too Old, No Replies

PHP Printing

Selecting a specific printer

         

HeadBut

1:35 am on May 19, 2006 (gmt 0)

10+ Year Member



Can you direct printing to a specific printer. I'd like to do it in the browser, but doing it from the server would be ok. I'd like to pick the printer by name.

Is this possible. On a Mac OS X.

eelixduppy

3:04 am on May 19, 2006 (gmt 0)



Generally, I believe, printing is accomplished using JavaScript's window.print() function.

HeadBut

1:34 pm on May 19, 2006 (gmt 0)

10+ Year Member



So it is not possible to print from PHP on the server?

whoisgregg

1:47 pm on May 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's possible. Read up on PHP's built in functions for printing [us3.php.net] and Apple's developer center printing section [developer.apple.com] (since you are on OS X).

Basically, you save a file to a location then use PHP to call the command line program to print that file.

eelixduppy

1:48 pm on May 19, 2006 (gmt 0)



You may be able to find info about what you are trying to accomplish here [us2.php.net]. If you just want the users to be able to print a page, then i would go with javascript.

(added)..again im too slow :)