0

Hello,

I want to build a system that allows me to print a document (from a input field) and it prints at my home.
Basically, if I'm out I have an input box that if I upload a file to it, it will print for when I get home. Same if I was sat downstairs I didn't have to mess around with the networking with it.

My printer is always connected to the internet (via my network)

Is this possible, in php?

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by cereal
0

In php it is unreal.
You may generate a page for print on php and then use javascript to put the page on print.

0

Maybe you can. On linux the command lp permits you to print to a remote printer. So if the php script runs on a linux box and makes use of system() or exec() you can print, an example:

<?php
exec('lp -h 123.123.123.123 filename.txt');
?>

where 123.123.123.123 is the remote ip of your printer. You'll probably have to convert some types of files before you can print them, check here:

- http://tldp.org/HOWTO/pdf/Printing-Usage-HOWTO.pdf

More reference:
- http://linux.about.com/od/itl_guide/a/gdeitl62t00.htm
- http://unixhelp.ed.ac.uk/CGI/man-cgi?lp
- http://php.net/manual/en/function.exec.php

good luck! :)

Edited by cereal: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.