Subject | Re: [firebird-php] OT - send escape character to printer directly through IE |
---|---|
Author | Almond |
Post date | 2005-12-08T13:48:15Z |
At 01:41 2005-12-07, Milan Babuskov wrote:
side. As you encountered this problem, is it really have nothing can due
with. Or, using firefox can fix this problem.
Best regards.
Almond Wong
>Almond wrote:I also use this method. But this require setup on sever side and client
> > Anybody know how to send a file with escape codes through IE to a
> > printer. I found that any escape codes are lost if the file is
> > processed through IE.
> >
> > I create a file contain some escape codes for dot matrix printer. If I
> > download the file and output to printer, there is no problem. But if I
> > using right click and select print, the escape codes are lost.
> >
> > I only succeeded with an activeX control which download the file and
> > then copy it to the printer. Is there another way to make it work ?
> > Since the aciveX control is not stable.
>
>Hi,
>
>I solved this by creating the print file on the server, and printing
>throught network directly (not through browser). For example, if you
>name the file "file.txt", you would do it like this:
>
>On Windows-to-Windows combination you can use a call like:
>
>system('copy /b file.txt > \\computer\printer_name');
>
>
>If you have Linux-to-Windows situation, you can use smbclient:
>
>system(
>"smbclient '\\computer\printer_name' -N -c \"print file.txt\" -P");
>
>Watch for wrap, it's a single line command.
side. As you encountered this problem, is it really have nothing can due
with. Or, using firefox can fix this problem.
>For Linux-to-Linux, you can use lpr command:Thank you for your advise :).
>
>system("lpr -l -Pprintername file.txt");
>
>
>Make sure you don't just use "file.txt", but rather a full path to the
>file, as the executed command might not run in the same directory as PHP.
>
>If you do this in a multiuser environment, you might also want to use
>multiple files, so everyone gets his own document printed. I used a
>Firebird's generator for this, to generate unique filenames: 1.txt,
>2.txt, 3.txt, etc.
>
>Summary: it isn't OT after all.
>
>P.S. Next time you start a conversation, please do not hijack other
>threads by hitting reply and deleting everything. It looks ugly in most
>e-mail clients. Just write a new message from scratch.
Best regards.
Almond Wong
>--
>Milan Babuskov
>http://fbexport.sourceforge.net
>http://www.flamerobin.org
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>__________ NOD32 1.1291 (20051118) Information __________
>
>This message was checked by NOD32 antivirus system.
>http://www.eset.com