copy a file to a printer

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
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

copy a file to a printer

Post by pelegk2 »

i wanto use the copy() function
to copy a file into a printer
so it will print it
how do i do that?
thanks in advance
peleg
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

The possibility to use copy function for printing depends on your OS, so please be more specific about it. (AFAIK, only Win* users can use copy to print).
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

yes i am using it from a printer

Post by pelegk2 »

i tried to do this :

Code: Select all

<?
$source="C:\mysql\bin\pet.txt";
$dest="//192.168.4.215:9100//pet.txt";
echo $dest."<BR>";
if (!copy($source, $dest)) &#123;
    print ("failed to copy $dest...<br>\n");
&#125;


?>
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

dunno if you mean printing a file out on a computer, or actually copying a file ( like an engine code ) over to the printer.

if it's the engine code, i wrote a program in delphi that does this that might be beneficial to you.

http://www.delphi3000.com/articles/article_2846.asp

you'll have to register ( it's free ) to view the code though...
Post Reply