Printing to a printer directly

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanju_76
Forum Newbie
Posts: 2
Joined: Wed Aug 01, 2007 4:23 pm

Printing to a printer directly

Post by sanju_76 »

Hello,

I have a requirement where I have to print to a printer directly, it is more or less like a print job where I have to send a bunch of generated documents to a printer instead of the browser.

Any clues is highly appreciated.

Thanks,
Sanjay
smudge
Forum Contributor
Posts: 151
Joined: Sun May 20, 2007 12:13 pm

Post by smudge »

Are you trying to print to the client's printer or the server's printer?
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

if it's clientside, the closest you can get is using something like scriptX
if it's serverside printer or on the same network you'll need to interface with the printer through a socket and send the output to it.. (not the smallest job)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

nathanr wrote:if it's clientside, the closest you can get is using something like scriptX
A PDF would work better.
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

feyd wrote:
nathanr wrote:if it's clientside, the closest you can get is using something like scriptX
A PDF would work better.
agreed, and if it can't be pdf'd (like a stream of shipping labels to a custom printer) its probably outside of the scope of php and would require a custom client application or object.
sanju_76
Forum Newbie
Posts: 2
Joined: Wed Aug 01, 2007 4:23 pm

Post by sanju_76 »

smudge wrote:Are you trying to print to the client's printer or the server's printer?
Clients printer..

Thanks for all the replies..

Sanjay.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

what about somekind of ftp to printer utility

Post by yacahuma »

what about somekind of ftp to printer utility. You could use a printer with an ftp server or a utility that receives documents through ftp and the print them.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Check PHP archtect magazine

Post by yacahuma »

You are in luck. Check the phparchitect magazine 2007-06 There is a full article on printing from PHP

I will suggest any php programmer to subscribe to this magazine.

http://www.phparch.com
Post Reply